Closed GoogleCodeExporter closed 8 years ago
Sorry. This might be an duplicate of this:
https://code.google.com/p/cocoa-rest-client/issues/detail?id=32
Original comment by nassoZe...@gmail.com
on 24 Jun 2013 at 8:28
I havn't found any workaround for this. Have been unable to post +, as is
needed for my testing.
The only way i could work around it was to double encode the string on the
client side and double decode the string on the serverside. It works as an
temporary fix while testing/developing.
Original comment by nassoZe...@gmail.com
on 25 Jun 2013 at 6:15
Thanks for the detailed description, I'll dig into this this weekend probably.
Original comment by mike.mat...@gmail.com
on 29 Jun 2013 at 3:40
Thanks, this will be fixed in the next release. There seems to be a strange
quirk in the URL encoding method in Cocoa for NSStrings such that "+" and "&"
are not escaped with %2B and %26, respectively. I'm not sure why. I was already
fixing the & case, but I have added code to correct the + as well.
As for the behavior of the raw request block, that is more debatable. I could
see how it would be a nice convenience to automatically form encode the block,
however it can get into deepwater quickly. Suppose the user wants to provide
two parameters:
"phonenumber" with value "+46.8"
"address" with value "First & Market St"
If the user then just entered the raw body:
phonenumber=+46.8&address=First & Market St
It's not really clear to the application (without more complex logic) which "&"
characters need to be encoded and which do not. So, I think because raw has
always just worked with an "encode it yourself" approach, I will leave that be.
Original comment by mike.mat...@gmail.com
on 29 Jun 2013 at 5:38
Original comment by mike.mat...@gmail.com
on 29 Jun 2013 at 8:34
Original issue reported on code.google.com by
nassoZe...@gmail.com
on 24 Jun 2013 at 8:22