cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: cURL does not redirect properly

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 28 Jun 2005 12:45:57 +0200 (CEST)

On Tue, 28 Jun 2005, ykhuang wrote:

> Above was logged by cURL. It got a response 200 OK but not 302 from server.
> Then it stopped by getting several blank lines as output.
> Compared to the log below captured by LiveHTTPHeader:

...

> cURL should be noticed to redirect to second URL but it didn't. What should
> I do to get correct response from server? Any hint is welcome.

Many servers attempt to detect user-agent and act differently depending on
that. Some check the referer field etc. There is no way for us (without
insight in server details) to know what made the server act differently, but
making the curl request look as similar as possible to the browser's request
is often a good start.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-06-28