On Sun, 2007-08-19 at 10:12 +0200, Roland Weber wrote: > Hi Oleg, all, > > I've taken a good look at the HTTP parsing code, with > a focus on the header of the messages. What I found is > that the actual parsing (and formatting) code is spread > across various static methods in o.a.h.message. > The message parsers for both traditional IO and NIO > are simply collecting full lines, feeding them to the > static parser methods afterwards. Header continuation > lines are handled by the message parsers. > > The parts I want to make easily replaceable are mostly > in the static methods. The short term goal is to allow > the replacing of parser and writer of the HTTP/1.x > protocol specification in requests and responses, in > order to allow for SIP/2.0. I've also noticed that we > cannot generate messages with header continuation lines. > > There parsing of headers into elements is not done > while a message is received, but on demand at a later > time. There is no corresponding way to format a header > from elements. I'd like to make the parser replaceable > too, but that has a rather low priority. > > cheers, > Roland >
Roland With all due respect I do not think this solves any real _practical_ problem, but merely rearranges things more to your personal liking. I can live with that and will not stand in your way. But I want to ask you of two things: (1) I invested A LOT of time and efforts into ensuring that parsing and formatting code generates nearly no intermediate garbage on the heap and is quite fast. It would be very regrettable if these code optimizations are lost (2) Please try to keep parsing and formatting logic in HttpCore base and NIO code logically consistent. Oleg > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
