Thanks Ray for looking into this. I commented out all of the backend PHP stuff 
just to see if anything changed but still received the same error msg. (and 
things keep on working). I’ll turn on VERBOSE and see what occurs there.

 

Note that I’m using build 7.39 via MSVC 11 on Windows 7 x64 as well. Back end 
Apache/Linux and PHP.

 

Daniel, thanks as well. I will build a new project with just the simple HTTP 
post module and run it separately from my app. Will let you know how that goes.

 

From: curl-library [mailto:[email protected]] On Behalf Of Ray 
Satiro via curl-library
Sent: Thursday, February 19, 2015 3:02 PM
To: [email protected]
Subject: Re: CURL_EASY_PERFORM error but data transfer works

 

On 2/18/2015 10:43 PM, Jon wrote:



In the following simple code below, I get a CURLE_WRITE_ERROR (23) on the 
return of the CURL_EASY_PERFORM function. This looks like a serious error 
(error text = failed writing received data to disk/application) however the 
data successfully was sent and received by the URL.

 

I have tested this on multiple occasions with the same error but yet things 
continue to work. Is this a documented benign error and/or can I ignore it? Or 
does it signal something more serious? Am I missing a setup call?

 

Function call (please note that I took out a real phone # for this email):

 

curl_out( <mailto:[email protected]&message=Thisisatest.> 
"[email protected]&message=This is a test.", "testpage2");

 


Ok here, but I had to change the MessageBox line to this:
MessageBoxA(NULL, buff, "Error", MB_OK);
I would take serious consideration to your sprintf calls and review [1].
 
Here is what I get in debug builds 7.39 and latest dev x86 on Windows 7 x64:
---------------------------------------------------------------------------
* upload completely sent off: 52 out of 52 bytes
* STATE: DO => DO_DONE handle 0x3c8f70; line 1314 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x3c8f70; line 1441 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x3c8f70; line 1454 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Date: Thu, 19 Feb 2015 19:16:06 GMT
* Server Apache is not blacklisted
< Server: Apache
< X-Powered-By: PHP/5.4.36
< Set-Cookie: 77d19e3ff79ff7b0c9990a8e6097383a=9b8bb9d0bd3abbfadb6fee49bcdd1176;
 path=/; HttpOnly
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
This is our PHP input (db) page<br />
<b>Fatal error</b>:  Cannot re-assign auto-global variable _POST in <b>/home/mob
ile45/public_html/www.keyonsec.com/phpincludes/phptest.php</b> on line <b>3</b><
br />
* STATE: PERFORM => DONE handle 0x3c8f70; line 1626 (connection #0)
* Connection #0 to host www.keyonsec.com left intact
---------------------------------------------------------------------------

Same result if I loop it (ie it reuses the connection correctly). Add 
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); If that doesn't help try 
Wireshark.  Maybe the server or something in between disconnects you.

If you need more help I would include all the information at [2] and it would 
be helpful to have a self contained example. If you have that then someone on 
here who shares your platform may help you and try it to see if they can 
reproduce.

[1]: 
https://www.securecoding.cert.org/confluence/display/seccode/STR31-C.+Guarantee+that+storage+for+strings+has+sufficient+space+for+character+data+and+the+null+terminator
[2]: http://curl.haxx.se/docs/bugs.html#What_to_report

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to