curl-library
Re: url string whitespace etc...
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 7 Mar 2002 00:02:19 +0100 (MET)
Date: Thu, 7 Mar 2002 00:02:19 +0100 (MET)
On Wed, 6 Mar 2002, rick vaillancourt wrote:
> The following would be easier to read without word wrap, but I have the
> hardcoded string that works, the string I replaced %20 to spaces and the
> result after curl_escape. Can you tell me what I did wrong?
Yes I can:
The curl_escape() function escapes *everything* you pass to it. It means that
it'll escape letters you probably would prefer not to have escaped. Letters
such as '?', '=', '.' and '&'.
You need to invoke curl_escape() on the individual small parts that you need
escaped, then build the URL correctly using the correct separators.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-03-07