cURL / Mailing Lists / curl-users / Single Mail

curl-users

BUG: automatic redirects with "http://somesite.com?data"

From: John McGowan <jmcgowan_at_inch.com>
Date: Wed, 17 Dec 2003 12:48:06 -0500

  [Report bugs to <curl-bug_at_haxx.se>]

Got a bug. It involves the handling of "http://somesite.com?data"
instead of "http://somesite.com/?data" during automatic redirects.

This is version

  curl 7.10.8 (i686-pc-linux-gnu) libcurl/7.10.8 OpenSSL/0.9.6b zlib/1.1.4
  Protocols: ftp gopher telnet dict ldap http file https ftps
  Features: SSL libz NTLM
==========================

Got spam. Tried it out ...

The spamvertized URL was:
  http://www.rapidsatellite.com/a.asp?rapidsat&2380

This got a redirect to:

 HTTP/1.1 301 Moved
 Location: http://www.myaffiliateprogram.com/u/rapidsat/t.asp?id=2380

That worked.

That was a redirect to:

 HTTP/1.1 302 Object moved
 Location: http://www.rapidsatellite.com?id=2380&sub=

and here is where the bug showed up.

THAT is a redirect to:

 HTTP/1.1 302 Found
 Location: /Default.aspx

and BUG!

Curl did not go to

  http://www.rapidsatellite.com/Default.aspx

It used the URL:

  http://www.rapidsatellite.com?id=2380&sub=/Default.aspx

(during the redirect it took the "?data" section as
 part of the hostname)

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-18