cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-588027 ] libcurl and HEAD

From: <noreply_at_sourceforge.net>
Date: Mon, 29 Jul 2002 06:04:07 -0700

Bugs item #588027, was opened at 2002-07-29 06:04
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=588027&group_id=976

Category: http
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: libcurl and HEAD

Initial Comment:
This bug is related to using libcurl with Tomcat and jsp
pages. In the default configuration Tomcat handles
properly HEAD request for files, however it returns the
whole body when doing a HEAD on jsp files -- the
Tomcat HEAD handler is probably just calling the GET
handler.

When using persistent connections and mixing HEAD
and GET commands libcurl may read the (wrongly sent)
body of a HEAD command as the header of the GET
command.

It seems that libcurl's header parser sets (or leaves) the
content-length to -1. The subsequent read loop keeps on
reading bytes from the input buffer and increments an
internal buffer until the internal buffer is equal with the
content length. Since the content length is -1 this can
never happen and libcurl eventually times out. After that
the libcurl does not seem to recover on that particular
socket.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=588027&group_id=976

-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
Received on 2002-07-29