curl-users
Re: [ curl-Bugs-405541 ] problem downloading gifs
Date: Sat, 3 Mar 2001 02:45:48 +0100
On Fri, Mar 02, 2001 at 02:15:21PM -0800, nobody wrote:
> Bugs #405541, was updated on 2001-03-02 14:15
> You can respond by visiting:
> http://sourceforge.net/tracker/?func=detail&atid=100976&aid=405541&group_id=976
>
> Category: http
> Group: wrong behaviour
> Status: Open
> Priority: 5
> Submitted By: Dominique De Munck
> Assigned to: Nobody/Anonymous
> Summary: problem downloading gifs
>
> Initial Comment:
> 02/03/2001 :
> This is what I tried :
>
> (didn't use -O option because of less comprehensive output)
>
> curl http://www.e-speak.net/features/module2/Slide24.gif
>
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>404 Not Found</TITLE>
> </HEAD><BODY>
> <H1>Not Found</H1>
> The requested URL /features/module2/Slide24.gif was not found on this server.<P><HR>
> <ADDRESS>Apache/1.3.13-dev Server at www.e-speak.net Port 80</ADDRESS>
> </BODY></HTML>
>
>
> Also, I can't download that file with other tools like wget or
> httrack. Yet I can view & save it with konqueror, opera & netscape.
> (using the gif-url directly)
for reasons probably best known to the webmaster of that site, the server
will only deliver content if it gets the "Host:" header without trailing
port number. Funny, but true.
Netscape for example sends the header "Host: www.e-speak.net" while curl
sends "Host: www.e-speak.net:80". Although both are equally correct
generally (as far as I know), the server somehow doesn't like the latter.
(you can also try it with Nescape: add a ":80" to the hostname and you'll
get the same effect...)
As a workaround you can force the accepted header format by explicitly
specifying the header with
curl -H "Host: www.e-speak.net" ...
Don't know whether there is a specific curl option for cases like these
(i.e. for suppressing the port in the "Host" header), at least I haven't
seen one in the manpage. Actually, IMHO, one can live without... ;)
Erdmut
-- Erdmut Pfeifer science+computing gmbh -- Bugs come in through open windows. Keep Windows shut! --Received on 2001-03-03