cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl: failed download due to missing encoding of spaces

From: Manfred Schwarb <manfred99_at_gmx.ch>
Date: Mon, 21 May 2012 12:43:53 +0200

> On Mon, 21 May 2012, Manfred Schwarb wrote:
>
> > It turns out it is because curl sends the above URL as-is to the server,
> > whereas wget and web browsers encode the embedded space:
>
> ...which of course in turn is because you didn't provide an actual URL,
> but
> something that only looked almost like a URL. A URL cannot contain spaces,
> as
> they are not legal parts of a URL.
>

OK, thanks for clarification.

This URL was gathered with "grep" from a preceding html page,
so this means the web programmer put an illegal URL inside
the <a href=...> token.

This programmer obviously assumed the web client does the
needed sanitizing (which, it seems, most of them do).
The programmer of course tested his web page only with web browsers,
which seem to correct this miscoding.

So I have to do the cleanup myself replacing spaces with %20.

Thanks,
Manfred

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-21