You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/08/19 16:19:27 UTC
DO NOT REPLY [Bug 30746] -
request.getProtocol() can return null
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30746>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30746
request.getProtocol() can return null
jfarcand@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From jfarcand@apache.org 2004-08-19 14:19 -------
I'm not convinced at all this is a Tomcat problem, and I'm -1 starting adding
null check because your of app/portlet. If the bug was in Tomcat, parsing the
request would have fail (check that snippet):
When the request is parsed:
515 if ((end - start) > 0) {
516 request.protocol().setChars(ascbuf, start, end - start);
517 } else {
518 request.protocol().setString("");
519 }
Then when we decide which protocol to use:
1101 MessageBytes protocolMB = request.protocol();
1102 if (protocolMB.equals(Constants.HTTP_11)) {
1103 http11 = true;
1104 protocolMB.setString(Constants.HTTP_11);
1105 } else if (protocolMB.equals(Constants.HTTP_10)) {
1106 http11 = false;
1107 keepAlive = false;
1108 protocolMB.setString(Constants.HTTP_10);
1109 } else if (protocolMB.equals("")) {
1110 // HTTP/0.9
1111 http09 = true;
1112 http11 = false;
1113 keepAlive = false;
1114 } else {
1115 // Unsupported protocol
1116 http11 = false;
1117 error = true;
1118 // Send 505; Unsupported HTTP version
1119 response.setStatus(505);
1120 }
Both snoppet are *always* executed.
I'm closing this bug. Please come with a test case that reproduce the problem.
And it's not clear if I read the link (forum) that it's a Tomcat problem at all
(it says Tomcat 4. 4.0.x of 4.1.x?)
Thanks
-- Jeanfrancois
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org