cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: URL containing spaces/white space

From: Cosmin Luță <cosmin.luta_at_avira.com>
Date: Mon, 17 Aug 2009 13:12:30 +0300

On Mon, 17 Aug 2009 10:01:48 +0000
centrio_at_gmail.com wrote:

> >> Spaces should be replaced with %20 in urls, afaik.
> >> For example:
> >> "http://example.com/a path"
> >> should become "http://example.com/a%20path"
>
> Well, i have idea about this. But my problem is the last ending
> spaces. Not the ones which are in between the URL words.
> ex:
> "http://www.aaa.cc/myindex.html "
>

If the document on the server is actually called "myindex.html " (with
a trailing space, which is very unlikely), you should escape it:

"http://www.aaa.cc/myindex.html%20"

Otherwise, you should delete the ending spaces (this is your safest
bet) when you pass the url to libcurl.

> Thanks
> Shivanand
Received on 2009-08-17