curl-users
Re: Follow up to forum post - trailing slash required on URLs
Date: Fri, 21 Jan 2005 21:49:42 -0600
Could that be related to your proxy?? When I try "curl -v
http://www.google.com" from home, with no proxy, I get:
* About to connect() to www.google.com port 80
* Trying 64.233.167.104... * connected
* Connected to www.google.com (64.233.167.104) port 80
> GET / HTTP/1.1
User-Agent: curl/7.12.3 (i686-pc-linux-gnu) libcurl/7.12.3
OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.11
Host: www.google.com
Pragma: no-cache
Accept: */*
< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Type: text/html
< Set-Cookie:
PREF=ID=a2ec1d1737211a33:TM=1106365283:LM=1106365283:S=Ed9nWrZEUSn9LzxN;
expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
< Server: GWS/2.1
< Transfer-Encoding: chunked
< Date: Sat, 22 Jan 2005 03:41:23 GMT
<html><head><meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1"><title>Google</title><style><!--
body,td,a,p,.h{font-family:arial,sans-serif;}
followed by the rest of Google's home page. I don't know *why* a
proxy wouldn't handle it properly, but right now it certainly works
for me without a proxy...
Ralph Mitchell
On Fri, 21 Jan 2005 14:57:44 -0800, DavidFilmer_at_freightliner.com
<DavidFilmer_at_freightliner.com> wrote:
> Three months ago I posted a commnet in the cURL forum which Daniel responded
> to, but I forgot to check back until now...
>
> I reported a problem:
>
> >>> FYI, I don't think this is a bug (it seems to be a syntax anomaly) but
> it might confound
> >>> some people and prehaps deserves mention in the docs (I didnt't find it
> there)...
>
> >>> On my system (AIX/ppc going through an authenticating HTTP proxy
> server), if you want to
> >>> see the default root document of a webserver, (such as index.html) it
> seems you can't
> >>> simply say:
> >>> curl http://google.com
> >>> but you must add a trailing slash (curl http://google.com/). Otherwise,
> you get a message:
> >>> <html><head><title>Error</title></head><body>The parameter is
> incorrect. </body></html>
> >>> For some reason, this is not true for https urls;
> >>> curl https://verisign.com
> >>> returns the root document without using a trailing slash in the command.
>
> Daniel asked that I mail the result of curl -v to this mailing list, so here
> it is:
>
> # curl -v http://www.google.com
> * Connected to name.of.my.proxy.server.com ((nil))
> > GET http://www.google.com HTTP/1.1
> Proxy-authorization: Basic ZmVuZ3JhMTp3bcxmYmFuZQ==
> User-Agent: curl/7.9.3 (powerpc-ibm-aix4.3.3.0) libcurl 7.9.3 (OpenSSL
> 0.9.6k)
> Host: www.google.com
> Pragma: no-cache
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
>
> * Closing connection #0
> <html><head><title>Error</title></head><body>The parameter is incorrect.
> </body></html>#
> #
>
> But if I add the trailing slash, I see:
>
> curl -v http://www.google.com/
> * Connected to name.of.my.proxy.server.com ((nil))
> > GET http://www.google.com/ HTTP/1.1
> Proxy-authorization: Basic amVuZ3JhMT83b2xmYmFcZQ==
> User-Agent: curl/7.9.3 (powerpc-ibm-aix4.3.3.0) libcurl 7.9.3 (OpenSSL
> 0.9.6k)
> Host: www.google.com
> Pragma: no-cache
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
>
> <html><head><meta http-equiv="content-type" content="text/html;
> charset=ISO-8859-1"><title>Google</title><style><!--
> body,td,a,p,.h{font-family:arial,sans-serif;}
> ... etc, etc (Google's homepage)
>
>
Received on 2005-01-22