cURL / Mailing Lists / curl-library / Single Mail

curl-library

[ curl-Bugs-1069285 ] Hang on 'improper' length of file passed as form field

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 19 Nov 2004 01:29:01 -0800

Bugs item #1069285, was opened at 2004-11-19 10:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1069285&group_id=976

Category: http
Group: hang
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin Frydl (frydl)
Assigned to: Daniel Stenberg (bagder)
Summary: Hang on 'improper' length of file passed as form field

Initial Comment:
curl 7.12.2 (i686-pc-linux-gnu) libcurl/7.12.2
OpenSSL/0.9.7a zlib/1.2.0.7

I've passed empty file to -F argument: '-F
param=<myfile' to post form to HTTP server. When this
file is being sent, curl ends in infinite loop doing
select on outgoing socket. The same behavior occurs
when file's size is multiple of 16K (16384).

Looking into sources revealed that
Curl_fillreadbuffer() (in fact readfromfile() in
formdata.c) returns zero in these cases since there are
no more bytes to fill next 16K bytes in buffer in
Curl_readwrite(). This seems to be interpretted as if
everything was written to output and now response is
expected.

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1069285&group_id=976
Received on 2004-11-19