You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/11/24 23:00:05 UTC
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Constants.java Http11Processor.java
remm 2002/11/24 14:00:05
Modified: http11/src/java/org/apache/coyote/http11 Constants.java
Http11Processor.java
Log:
- Save on string generation for the method (for GET and POST), as well as
the protocol (where it must be either HTTP/1.0 or HTTP/1.1).
Revision Changes Path
1.12 +18 -0 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Constants.java
Index: Constants.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Constants.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Constants.java 10 Oct 2002 13:14:55 -0000 1.11
+++ Constants.java 24 Nov 2002 22:00:04 -0000 1.12
@@ -211,6 +211,24 @@
/**
+ * GET.
+ */
+ public static final String GET = "GET";
+
+
+ /**
+ * HEAD.
+ */
+ public static final String HEAD = "HEAD";
+
+
+ /**
+ * POST.
+ */
+ public static final String POST = "POST";
+
+
+ /**
* Ack string when pipelining HTTP requests.
*/
public static final byte[] ACK =
1.45 +7 -0 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
Index: Http11Processor.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Http11Processor.java 24 Nov 2002 21:20:39 -0000 1.44
+++ Http11Processor.java 24 Nov 2002 22:00:04 -0000 1.45
@@ -639,9 +639,11 @@
MessageBytes protocolMB = request.protocol();
if (protocolMB.equals(Constants.HTTP_11)) {
http11 = true;
+ protocolMB.setString(Constants.HTTP_11);
} else if (protocolMB.equals(Constants.HTTP_10)) {
http11 = false;
keepAlive = false;
+ protocolMB.setString(Constants.HTTP_10);
} else if (protocolMB.equals("")) {
// HTTP/0.9
http09 = true;
@@ -656,6 +658,11 @@
}
MessageBytes methodMB = request.method();
+ if (methodMB.equals(Constants.GET)) {
+ methodMB.setString(Constants.GET);
+ } else if (methodMB.equals(Constants.POST)) {
+ methodMB.setString(Constants.POST);
+ }
// Check connection header
MessageBytes connectionValueMB =
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>