curl-users
Re: curl: failed download due to missing encoding of spaces
Date: Mon, 21 May 2012 11:51:44 +0200 (CEST)
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.
curl will not try to encode what you pass to it like that, it will instead
pass on what you specified. It simply assumes that you tell curl the right
things.
Other clients may opt to handle the input differently.
> Shouldn't curl encode these spaces, or is the web server (Microsoft-IIS/5.0)
> simply broken?
If you want to send encoded spaces, then you should use the correct URL. If
you want to see how the server handles actual spaces instead of encoded ones,
then use them as-is!
-- / daniel.haxx.se ------------------------------------------------------------------- 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.htmlReceived on 2012-05-21