You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/24 14:51:28 UTC
[tomcat] 08/11: Back-port performance optimization for path params
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 8086f27d1c290063334761200c39ddebddcc14de
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 24 11:19:03 2019 +0100
Back-port performance optimization for path params
---
java/org/apache/catalina/connector/CoyoteAdapter.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 1420dd2..151fb48 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -988,6 +988,11 @@ public class CoyoteAdapter implements Adapter {
ByteChunk uriBC = req.decodedURI().getByteChunk();
int semicolon = uriBC.indexOf(';', 0);
+ // Performance optimisation. Return as soon as it is known there are no
+ // path parameters;
+ if (semicolon == -1) {
+ return;
+ }
// What encoding to use? Some platforms, eg z/os, use a default
// encoding that doesn't give the expected result so be explicit
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org