cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: help

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 2 Nov 2009 16:14:11 +0100 (CET)

On Mon, 2 Nov 2009, Gary Woodley wrote:

> Up to now everything has function correctly running curl.exe with the
> following config file
>
> url =
> "https://securecxl.com:5533/-mc6815145&-cd1111222233334444&-ed1209&-is0&-am2
> 393&-ds1 via IWS&- hn60&-zpLU7 ABC&-sc123&-x"

Spaces are invalid within a URL. They need to be encoded as %20.

> I have now been asked to surround some of the options with double quotes as
> follows:-
>
> url =
> "https://securecxl.com:5533/-mc6815145&-cd1111222233334444&-ed1209&-is0&-am2
> 393&-ds1"via IWS"&-hn"60"&-zp"LU7 ABC"&-sc123&-x"

Wow. That looks completely messed up - and it still has those invalid spaces.
What exactly is those double quotes meant to do there? If you really want
double quotes in the URL I suggest you send them as %22 instead so that you
don't confuse curl's config file parser. Or you escape the double quotes you
want to send as \".

> When the string is sent, as I expected all they receive is the string
> between the 1st and 2nd quotation marks as follows:-
>
> https://securecxl.com:5533/-mc6815145
> <https://securecxl.com:5533/-mc6815145&-cd1111222233334444&-ed1209&-is0&-am2
> 393&-ds1> &-cd1111222233334444&-ed1209&-is0&-am2393&-ds1

Uh, why don't you just remove all junk after the second quotation mark then if
that is what you want?

-- 
  / 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.html
Received on 2009-11-02