cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-462600 ] Default protocol during redirect

From: <noreply_at_sourceforge.net>
Date: Tue, 18 Sep 2001 10:13:57 -0700

Bugs item #462600, was opened at 2001-09-18 10:13
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=462600&group_id=976

Category: http
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Ramana Mokkapati (mvr707)
Assigned to: Daniel Stenberg (bagder)
Summary: Default protocol during redirect

Initial Comment:
Probably a bug:

I am used to take advantage of the fact that http is
default
protocol. That is, am lazy and use as

% curl req-qa.company.com

rather than, more accurate(% curl http://req-
qa.company.com)

Then I bumped into the following problem during a
redirect.
If req-qa.company.com redirects me

Location: redirect.asp?URL=http://req-
qa.company.com/login.asp

During redirect, curl thinks the protocol is
"redirect.asp?URL=http" which is NOT correct
(see detailed log below)

Ofcourse, if I use
% curl http://req-qa.company.com
the redirection is still the same

Location: redirect.asp?URL=http://req-
qa.company.com/login.asp

But is interpreted corerctly as
http://req-qa.company.com/redirect.asp?URL=http://req-
qa.company.com/login.asp

% curl req-qa.company.com -L -v -i
* Connected to req-qa.company.com (10.17.191.18)
> GET / HTTP/1.1
User-Agent: curl/7.8.1 (win32) libcurl 7.8.1 (OpenSSL
0.9.6b)
Host: req-qa.company.com
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*

HTTP/1.1 302 Object moved
Server: Microsoft-IIS/5.0
Date: Tue, 18 Sep 2001 16:37:41 GMT
Location: redirect.asp?URL=http://req-
qa.company.com/login.asp
Content-Length: 174
Content-Type: text/html
Set-Cookie:
ASPSESSIONIDGQQQQZWK=OOMPBAOAJDKKIFEENIEADDMG; path=/
Cache-control: private

* Follow to new URL: redirect.asp?URL=http://req-
qa.company.com/login.asp
* Connection (#0) left alive
* Follows Location: to new URL: 'req-
qa.company.com/redirect.asp?URL=http://req-
qa.company.com/login.asp'
* Disables POST, goes with GET
curl: (1) Unsupported protocol: req-
qa.company.com/redirect.asp?URL=http
* Closing live connection (#0)

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=462600&group_id=976
Received on 2001-09-18