hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew W. Buchanan" <bucha...@difference.com>
Subject Patch Submission for Header parsing error
Date Fri, 09 Jan 2004 21:04:14 GMT
I've been encountering a frequent problem with the 2.0-rc2 release in the 
spider I'm working on where the HttpParser throws an exception when a extra 
byte is returned from a web server. When this exception is thrown, none of 
the Headers are returned even though they all contained valid data.


An example packet from Ethereal is attached.

As you can see, there is an extraneous byte (0x00) being sent that is causing 
the problem.

I've attached a quick and dirty patch to fix this. There was already a test 
looking for a length < 1 in order to skip processing. Rather than 
specifically looking for this case, I simply changes the check to look for a 
length < 2 on the grounds that there could never be a valid header of one 
character anyway. The patch is against HEAD, but would probably apply to 
2.0-rc2 release cleanly.

Let me know what you think.

Let me know if this is the wrong place to post this!

Andrew Buchanan

Mime
View raw message