You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Adam Fisk <ad...@gmail.com> on 2007/06/01 16:49:28 UTC

[AsyncWeb] possible bug

I've taken the AsyncWeb code and modified it to create a stateless SIP
server, and I came across a possible bug.  First off, the AsyncWeb code is
really impressive -- I love the state machine and the performance gain from
not reading a bunch of data and then reparsing it (much faster than the old
BufferedReader.readLine followed by parsing the line approach).  Great work
Trustin and Trevor and "irvingd" from the code.

The possible bug I came across is in the HTTP header value reading.  It
looks like the code doesn't properly handle HTTP header values where
multiple values are included in the same header and are delimited with a
comma.  I believe the HttpHeaderDecodingState READ_HEADER_VALUE state should
read to either a CRLF or a comma instead of just CRLF.  The comma would
trigger another READ_HEADER_VALUE state.

The comma delimiting is specified in RFC 2616 at the end of section 4.2 on
page 22.

I would supply a patch, but I handle this a little differently in my code
because I haven't yet rewritten everything and still use some of my old
header parsing code.  Should I be entering a bug somewhere?  Am I missing
something in the code or RFC?  I'd be more than happy to write a test for it
as well -- a simple HTTP header value parsing test.

SIP makes use of comma delimiters in HTTP header values (SIP headers are
HTTP headers) more often than HTTP, which is probably why I came across it.

Great work again.  Get all the legal wrangling worked out for AsyncWeb.
It's a great project -- I really haven't been this impressed with chunk of
code in awhile!

-Adam

Re: [AsyncWeb] possible bug

Posted by Dave Irving <da...@bankofamerica.com>.
Hi Adam!

A stateless SIP server built on top of AsyncWeb - wow that sounds exciting!
Thanks so much for the detailed bug detail. The official place for asyncweb
bugs is our Jira over at safehouse:
http://jira.safehaus.org/secure/BrowseProject.jspa?id=10070.

This, of course, could all change soon with the (hopefully) soon upcoming
move over to mina.
However, I think for now it is probably the best place to record it (we'll
move over outstanding Jiras along with the move).

Im just sorry that I don't have time to fix it personally just yet! I've
recently started a new job and am currently commuting for 4 hours a day -
leaving no time for asyncweb work at the moment :o(

However, things are progressing and I should be moving much closer to work
in the next few weeks - and of course - my first priority will be spending
much more time on AsyncWeb!!

Thanks so much for the great feedback too! It's great to hear that people
are enjoying working with AsyncWeb!

-- 
View this message in context: http://www.nabble.com/-AsyncWeb--possible-bug-tf3852774.html#a11022177
Sent from the mina dev mailing list archive at Nabble.com.