At my primary job we run automated processes that upload XML data to web services via POST requests. This suits us fine because it means we can upload the data from any authenticated location. To do this I use cURL. Recently however the process just stopped working.
Many changes had been made to the application in question so I could put it down to a number of things. To test it I manually ran the process from the calling server and was confused when I saw the following:
“Excess found in a non pipelined read”
This message is particularly useless when searching on google. It seems no-one has any idea why it’s occurring in certain circumstances. A 302 was seen in the request and then it clicked. We are now using HTTPS as opposed to HTTP, it was down to the fact that the request was failing due to security.
So, go to http://www.paehl.com/open_source/?CURL_7.23.1 and get the SSH2/SSL version of cURL and also get the OpenSSL DLL’s. If you place the OpenSSL DLL’s in the same directory it then the SSH2/SSL version of cURL will work just fine.
In my environment I used the -k flag to ignore the SSL certificate that would ultimately cause the request to fail once again. Also ensure you’re using “https” in your request and not “http”.
Basically, the error message you receive in this instance isn’t reflective of what’s actually going on behind the scenes. The error message does make sense if you take a look at the C source code hosted in various places. Just do a search for the message you receive once the request is received and you’ll see why it happens. It doesn’t matter though, provided you’ve got the correct libs and are making the correct request then it’ll work fine.
blog comments powered by Disqus