You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by David Campbell <da...@pastornet.net.au> on 2001/03/05 20:46:33 UTC
Patch for HTTP protocol bug in jakarta-apache
Hi,
I would like to contribute the diff below, that should correct a current
HTTP protocol violation in virtually every request served by jakarta-apache,
and prevents jakarta-apache URLs being opened by various strict HTTP
clients such as PHP and Yospace SmartPhone WAP browser.
The problem has been in the bug database for some time at
http://znutar.cortexity.com/BugRatViewer/ShowReport/151
Basically the problem is that jakarta-tomcat responses return:
HTTP/1.1 200
but does not have a space character after the Status-Code (ie the 200),
which is required by the spec, even if the Reason-Phrase is the empty string:
From the HTTP spec:
6.1 Status-Line
The first line of a Response message is the Status-Line, consisting
of the protocol version followed by a numeric status code and its
associated textual phrase, with each element separated by SP
characters. No CR or LF is allowed except in the final CRLF sequence.
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
-------------------------------------------------------------------------------------------------------------------------
The diff for jakarta-tomcat/src/share/org/apache/tomcat/service/http/Attic/HttpResponseAdapter.java
diff -r1.11.2.1 HttpResponseAdapter.java
134a135
> printHead(" ");
136d136
< printHead(" ");
Note, I don't have a build environment, so this is untested by me, but it should work.
Please CC me directly with any e-mails because I'm not on the list.
--
Regards,
-- Dave Campbell
PHONE AUS 07 3216 6015
PHONE INTL +61 7 3216 6015
RE: Patch for HTTP protocol bug in jakarta-apache
Posted by Marc Saegesser <ma...@apropos.com>.
What version are you using? I've verified that the reason phrase is being
sent back on all the tests that I've run. Do you have a specific example of
a request that doesn't work? Include a packet capture if possible.
> -----Original Message-----
> From: David Campbell [mailto:david@pastornet.net.au]
> Sent: Monday, March 05, 2001 1:47 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Patch for HTTP protocol bug in jakarta-apache
>
>
> Hi,
>
> I would like to contribute the diff below, that should correct a current
> HTTP protocol violation in virtually every request served by
> jakarta-apache,
> and prevents jakarta-apache URLs being opened by various strict HTTP
> clients such as PHP and Yospace SmartPhone WAP browser.
>
> The problem has been in the bug database for some time at
> http://znutar.cortexity.com/BugRatViewer/ShowReport/151
>
> Basically the problem is that jakarta-tomcat responses return:
> HTTP/1.1 200
> but does not have a space character after the Status-Code (ie the 200),
> which is required by the spec, even if the Reason-Phrase is the
> empty string:
>
> From the HTTP spec:
> 6.1 Status-Line
>
> The first line of a Response message is the Status-Line, consisting
> of the protocol version followed by a numeric status code and its
> associated textual phrase, with each element separated by SP
> characters. No CR or LF is allowed except in the final
> CRLF sequence.
>
> Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
>
> ------------------------------------------------------------------
> -------------------------------------------------------
> The diff for
> jakarta-tomcat/src/share/org/apache/tomcat/service/http/Attic/Http
ResponseAdapter.java
>
> diff -r1.11.2.1 HttpResponseAdapter.java
> 134a135
> > printHead(" ");
> 136d136
> < printHead(" ");
>
> Note, I don't have a build environment, so this is untested by
> me, but it should work.
>
> Please CC me directly with any e-mails because I'm not on the list.
>
> --
> Regards,
> -- Dave Campbell
> PHONE AUS 07 3216 6015
> PHONE INTL +61 7 3216 6015
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org