On Wed, 17 Feb 2010, Tiberiu Motoc wrote:

From all systems where i deployed my curl based app, there is one which returns "empty reply from server" curl(52). I did find one other thread on this newsgroup which was describing the same problem: http://curl.haxx.se/mail/archive-2005-01/0129.html.

I wouldn't be so sure that you have the same problem, but perhaps it is.

The guy was able to solve it by writing a curlrc in his home directory with comtents User-Agent: curl. What does that solve? What does it do?

It modifies the User-Agent: field in curl's requests to that fixed string.

I dont bage access to that system so it is difficult for me to
investigate.

Setting the agent with CURLOPT_USERAGENT is what he did.

And no, there's no explanation, sensible or crazy, that explains why setting the user-agent to that was a good idea for him.

In your case, as I believe you're using libcurl and not curl, it might make sense in the way that without an explictit user-agent libcurl sends none and perhaps there's a transparent proxy or something similarly stupid in the way in this particular instance that requires such a field for it to be considered a valid and fine request.

I'm speculating wildly.

--

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

Reply via email to