Share

Winstone Servlet Container

Tracker: Bugs

5 RFC violation: Reason-Phrase not present in status line - ID: 1778706
Last Update: Comment added ( gwynevans )

http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 says:

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

Reason-Phrase is not optional, if I see correctly, but winstone doesn't


RISKO Gergely ( errge ) - 2007-08-21 15:44

5

Closed

Accepted

Nobody/Anonymous

None

None

Public


Comments ( 9 )




Date: 2008-07-17 08:11
Sender: gwynevans


Sorry, Rick - my test script was still picking up 0.9.9. Once I found &
fixed that, it's working as expected.


Date: 2008-07-16 10:44
Sender: rickknowlesProject Admin


Not true - I just tried this with 0.9.10, and got the message

HTTP/1.0 200 OK

I think you must have something different about your environment that you
haven't explained. Are you using AJP13 behind apache ? Can you send debug
logs (add --debug=9 to the startup) ?

I'm leaving this bug closed, and will need further info before pursuing
this.


Date: 2008-07-15 15:33
Sender: gwynevans


Looks to me as if the fix wasn't complete, as 0.9.10 still returns a
response of "HTTP/1.0 200" rather than "HTTP/1.0 200 OK".

Unfortunately, I found this out by coming across a custom app that was
expecting to use the " " to help it parse the status response...

/Gwyn


Date: 2007-10-14 14:49
Sender: rickknowlesProject Admin


Thanks - patch received and committed to CVS. Will go out in the next
release.


Date: 2007-10-14 12:42
Sender: errge


File Added: winstone-0.9.9.patch


Date: 2007-10-03 15:26
Sender: rickknowlesProject Admin


ok - agreed it should be added then.

I'm ridiculous busy at the moment with paid work though, so it will get
done faster if someone else patches it. My guess would be to modify around
line 118 of the class winstone.WinstoneOutputStream, and maybe have reason
phrases in the LocalStrings.properties resource bundle like:

WinstoneOutputStream.reasonPhrase.404=Not found
WinstoneOutputStream.reasonPhrase.200=OK

Sorry for the delay, but winstone comes a distant second to paying off the
mortgage ...


Date: 2007-10-03 12:30
Sender: mainzelm


I also have a problem with the lacking Reason-Phrase. In my case the
client is a custom application, written and operated by a different
company.


Date: 2007-09-27 16:30
Sender: errge


Of course there is a client that breaks, this is why I bothered reporting
it. Nokia's j2me builting http class throws an exception because of this
bug.


Date: 2007-09-27 16:04
Sender: rickknowlesProject Admin


Probably true ... but I've yet to come across a single client that
actually uses it or even logs so much as a warning when it's not present.

If someone can point out some client that breaks because of this I'll
consider fixing it, but spec compliance for compliance sake is something
I'm willing to sacrifice in an effort to keep the jar size down.


Log in to comment.




Attached File ( 1 )

Filename Description Download
winstone-0.9.9.patch status line reason phrase for cvs version: http://www.gergely.risko.hu/winstone-0.9.9.patch Download

Changes ( 9 )

Field Old Value Date By
status_id Open 2007-10-14 14:49 rickknowles
close_date - 2007-10-14 14:49 rickknowles
resolution_id Rejected 2007-10-14 14:49 rickknowles
status_id Closed 2007-10-14 12:42 errge
close_date 2007-09-27 16:04 2007-10-14 12:42 errge
File Added 249615: winstone-0.9.9.patch 2007-10-14 12:42 errge
resolution_id None 2007-09-27 16:04 rickknowles
close_date - 2007-09-27 16:04 rickknowles
status_id Open 2007-09-27 16:04 rickknowles