curl-and-python
Re: PycURL form posting
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 17 May 2008 14:02:46 +0200 (CEST)
Date: Sat, 17 May 2008 14:02:46 +0200 (CEST)
On Fri, 16 May 2008, Jo Pettitt wrote:
> I have been writing a script to automate the creation of page on my Drupal
> site. When it comes to posting text into the various fields I am having
> problems getting text with spaces to be posted on the form. If I change all
> spaces to %20 then echo the string out prior ro posting all of the character
> codes are removed and the text will appear with no spaces in it at all.
>
> Is there a simple way of keeping hte spaces within my cURL post?
Regular HTTP POST contents are meant to be URL-encoded, so yes then you need
to encode plain spaces to %20. Some receiving ends may still understand and
deal with plain spaces in the content though.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-pythonReceived on 2008-05-17