cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3377374 ] Upload file hangs

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 26 Jul 2011 15:58:07 -0230

Bugs item #3377374, was opened at 2011-07-25 15:26
Message generated for change (Settings changed) made by jeffrega
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3377374&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: None
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: ranger (jeffrega)
Assigned to: Daniel Stenberg (bagder)
Summary: Upload file hangs

Initial Comment:
Trying to upload a file. I read the online documentation and multiple forums. None proved any success.

Nothing special:
- 12kb text file
- Connects, content length matches file size. Then it hangs.

CURLOPT_URL -> my local IIS5 server
CURLOPT_INFILESIZE -> size of file
CURLOPT_INFILE -> FILE* opened file
CURLOPT_UPLOAD -> 1
CURLOPT_VERBOSE -> 1

curl_easy_perform( ) // HANGS HERE - never get past this line

Tried on Win7 and Win2k3

Any advice or suggestions? Thanks.

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

>Comment By: ranger (jeffrega)
Date: 2011-07-26 15:58

Message:
File needs to be opened in BINARY mode. Did not know this.

Works for me now.

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

Comment By: ranger (jeffrega)
Date: 2011-07-26 12:00

Message:
More info:
Tried another method using READFUNCTION (sample that came with libcurl)
and READDATA (the FILE*) and it prints out
- Read 4 bytes from file
- Read 0 bytes from file
<hangs here>

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

Comment By: ranger (jeffrega)
Date: 2011-07-26 11:34

Message:
Stepped through the code this morning (mine and LibCurl) and the function
Transfer( ) function in transfer.c continually loops in the while loop.
This is the cause of the hang. But I don't know why.

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3377374&group_id=976
Received on 2011-07-26

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET