cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem on HTTP redirect to relative path

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 22 Mar 2012 00:27:53 +0100 (CET)

On Tue, 20 Mar 2012, Woods wrote:

> (1) if using http://somehostname/index.php as target url, the redirection
> can be performed but the result code/msg is "URL using bad/illegal format
> or missing URL". Why is it treated as an illegal url?

I don't understand the actions you're taking. Can you please be more specific?

> (2) if using http://somehosename as target url, libcurl CANNOT handle
> redirection in that it requests the same url repeatedly without picking the
> relative path from LOCATION header. It means program will block on
> curl_easy_perform permanently.

I don't understand. when it follows locations, where does it pick the new URL
from if not from the Location: header?

> Please refer to the following HTTP capture for both cases. Do check the
> trace for CASE (2) which looks like a bug.

Maybe. It didn't show your program source code or the libcurl version used to
repeat the problem so I'd say there is still room for alternative
interpretations.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-22