httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Carmichael <>
Subject A possible bug with get_line in v1.3
Date Thu, 05 Aug 2004 21:19:03 GMT
Hello Everyone,

I have run into an odd bug with a client and multipart
file uploads. I have been running into an issue with
file uploads where a client would only have a subset
of the total files found in a post. It seems that
client would send data at a very slow rate and that
the 'find_boundary' code never located the next file's
boundary  (this could fail after the first, second, or
n file). After looking through the code, it seems that
the 'get_line' function only tries to get data into
the buffer twice before moving on. In my problem case,
these two reads could sometimes only add a single byte
or two to the buffer which would never be the next
complete boundary and/or end of line. At this point,
the get_line function would return null and the
find_boundary function would exit.

I have a patch for fix this by retrying a few more
times. Basically, it checks to see if the buffer still
has space and if there bytes remaining to be read from
the client. If so then it would try to fill the buffer
until if found a line. After a number of tries it
would give up and exit the loop. 

I am wondering if anyone else has seen this problem.
Also, would it be best for me to post the updated
'get_line' function to the list for review or is there
a better way?

Thanks for you time,


Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages! 

View raw message