Re: NSURLConnection substitutes characters?
Re: NSURLConnection substitutes characters?
- Subject: Re: NSURLConnection substitutes characters?
- From: Stefan Arentz <email@hidden>
- Date: Sat, 12 Jul 2008 23:14:37 -0400
On Jul 12, 2008, at 10:17 PM, email@hidden wrote:
Hi
I wrote a class (PHPInvocation) that handles all the nitty gritty
details of preparing NSURLRequests, NSURLConnections etc for calls
to PHP scripts, but have run across this nasty bug. What's happening
is that somewhere between the creation of an NSURLConnection and the
target PHP script, "+" characters in base64 data get converted to
spaces.
A '+' character is a shortcut for a space that you can use in the URI
and Query parts of a URL. PHP will convert those for you. Which will
happen on the server/php side.
If you want to send Base64 encoded data in a query parameter (or post
data) then you will need to 'percentage-escape' it properly. In which
case a '+' needs to be translated to a '+'.
S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden