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 12:49:56 +0300

On Mon, 17 Aug 2009 09:39:24 +0000
centrio_at_gmail.com wrote:

> Hi,
> I wanted to know if I use easy handle and call
>
> curlEasyStatusCode = curl_easy_setopt(curlEasyHandle,
> CURLOPT_URL, url.c_str());
>
> url is a string.
>
> and if my url contains white spaces at the end, will it cause any
> connection failures?? Or curl will ignore the whitespaces
> at the end and do it correctly. I found out that the white spaces at
> the beginning of a URL create problem in identifying the
> protocol.
>
> But when I tried putting white spaces at the end of URL, they
> succeded sometimes and sometimes failed.
>
> Please let me know the behaviour incase of white spaces at the end of
> a URL.
>
> Thanks you.
> Regards
> Shivanand

Spaces should be replaced with %20 in urls, afaik.
For example:
"http://example.com/a path"
should become "http://example.com/a%20path"
Received on 2009-08-17