You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Martin Algesten <ma...@taglab.com> on 2002/10/31 16:09:27 UTC
Status-Line with no Reason-Phrase
It seems to me that the Coyote JK 2 connector doesn't set the
Reason-Phrase for the responses, is this right?
I know that you don't have to do this according to the HTTP/1.1 spec.
However once again my dear mod_proxy isn't to happy about a status line
saying: "HTTP/1.1 200 " (the trailing space is significant). In this
situation mod_proxy inserts an extra line break in the header after the
status line but before the headers ending up with something like:
HTTP/1.1 200
Date: Thu, 31 Oct 2002 14:58:28 GMT
Server: Apache/1.3.26 (Unix) mod_jk/1.1.0 DAV/1.0.3 mod_ssl/2.8.10
OpenSSL/0.9.6g
Set-Cookie: JSESSIONID=1B937C37372FC2947895B82B361D8B0E; Path=/
Content-Type: text/html; charset=utf-8
X-Cache: MISS from rhubarb.salad.taglab.com
Transfer-Encoding: chunked
And I can tell you that doesn't look pretty in the browser :)...
I know this is really not Coyote's problem, this is a bug in mod_proxy.
According to the HTTP/1.1 spec it might even be more correct to send the
trailing space than without, however that is exactly what triggers the
bug...
If I despite this would like Coyote JK 2 to provide the Reason-Phrase...
Would the correct place to do so be in the org.apache.coyote.Response
using org.apache.tomcat.util.http.HttpMessages class?
Martin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Status-Line with no Reason-Phrase
Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
I have reported a PR (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14086)
about mod_jk. Because I am not getting the "Reason-Phrase" in the response.
Martin Algesten wrote:
> It seems to me that the Coyote JK 2 connector doesn't set the
> Reason-Phrase for the responses, is this right?
>
> I know that you don't have to do this according to the HTTP/1.1 spec.
> However once again my dear mod_proxy isn't to happy about a status line
> saying: "HTTP/1.1 200 " (the trailing space is significant). In this
> situation mod_proxy inserts an extra line break in the header after the
> status line but before the headers ending up with something like:
>
> HTTP/1.1 200
>
> Date: Thu, 31 Oct 2002 14:58:28 GMT
> Server: Apache/1.3.26 (Unix) mod_jk/1.1.0 DAV/1.0.3 mod_ssl/2.8.10
> OpenSSL/0.9.6g
> Set-Cookie: JSESSIONID=1B937C37372FC2947895B82B361D8B0E; Path=/
> Content-Type: text/html; charset=utf-8
> X-Cache: MISS from rhubarb.salad.taglab.com
> Transfer-Encoding: chunked
>
> And I can tell you that doesn't look pretty in the browser :)...
My colleague Martin Kraemer fixed something in Apache-1.3 (22/07/2002):
+++
Modified: src/modules/proxy proxy_util.c
Log:
Tomcat with mod_jk2 sometimes omits the Reason-Phrase from the
response line ("HTTP/1.1 200 \r\n"). It looks like RFC2616 allows this,
but ap_getline() strips the trailing blank, and that lead to
an error in ap_proxy_read_response_line() for proxy-requests to
Tomcat+mod_jk2 servers. (It replaced the NIL after the "200" by
a space, and so the resulting response line had an extra NL appended).
Now the SP character which was deleted by ap_getline() is reappended,
avoiding the erroneous '\0'->' ' change, and preserving RFC2616's
requirement
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
Reason-Phrase = *<TEXT, excluding CR, LF>
(thus there is now always a SP after the Status-Code).
+++
May be you need this fix.
>
> I know this is really not Coyote's problem, this is a bug in mod_proxy.
> According to the HTTP/1.1 spec it might even be more correct to send the
> trailing space than without, however that is exactly what triggers the
> bug...
>
> If I despite this would like Coyote JK 2 to provide the Reason-Phrase...
> Would the correct place to do so be in the org.apache.coyote.Response
> using org.apache.tomcat.util.http.HttpMessages class?
>
> Martin
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>