curl-library
Re: Empty reply from server and curlrc file
Date: Thu, 18 Feb 2010 18:57:24 -0800
On Thu, Feb 18, 2010 at 4:42 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> 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.
>
curl and libcurl behave the same on that machine. I was able to run
curl on that system and it came back with the same error as the
application (which was using libcurl). I don't know if I still have
access to that machine, but if I do, I will try this idea and post the
results.
Thanks,
Tiberiu
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-19