curl-library
Re: Space in URL
Date: Mon, 09 Sep 2002 14:53:26 +0530
Hi all,
Encoding space as '%20 in the URL is not helping.The error persists
because the modified url contains a '%20' character which is not in the
original address, cause of which 400,bad request error is returned.
The example where i am encountering this probelm is :-
c.setopt(pycurl.URL,'http://tarahaat.com/health/Healthy Motherhood')
Is there any other way to encode the spaces in the URL?
Cheers
Preeti Chitkara
-----Original Message-----
From: Holger Rauch <Holger.Rauch_at_heitec.de>
To: curl-library_at_lists.sourceforge.net
Date: Fri, 6 Sep 2002 14:15:48 +0200 (CEST)
Subject: Re: Space in URL
> Hi!
>
> On Fri, 6 Sep 2002, preetic wrote:
>
> > I am facing a problem regarding space in url,cause of which data is
> not
> > being posted.
> > The piece of code is as follows:
> > import pycurl
> > c=pycurl.init()
> > c.setopt(pycurl.URL,'http://tarahaat.com/health/Healthy Motherhood')
> > c.perform()
>
> I recently had the same problem with the C version of the library. You
> have to encode spaces in URLs as %20. So, change the line reading
>
> c.setopt(pycurl.URL,'http://tarahaat.com/health/Healthy Motherhood')
>
> to
>
> c.setopt(pycurl.URL,'http://tarahaat.com/health/Healthy%20Motherhood')
>
> and run your Python program again.
>
> Hope that helps!
>
> Greetings,
>
> Holger
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-09-09