tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Campbell <da...@pastornet.net.au>
Subject Patch for HTTP protocol bug in jakarta-apache
Date Mon, 05 Mar 2001 19:46:33 GMT
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



Mime
View raw message