al03 / cocoa-rest-client

Automatically exported from code.google.com/p/cocoa-rest-client
Other
0 stars 0 forks source link

Fails when a URL contains non-ASCII characters #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Try to perform a request containing a non-ASCII character: 
http://devserver/api/search.json?last_name=øst*

What is the expected output? What do you see instead?

I expect to see the search result returned from the API but all I get is this: 
"Connection to http://devserver/api/search.json?last_name=øst* failed."

What version of the product are you using?

1.3.1

Original issue reported on code.google.com by frederic...@gmail.com on 21 Feb 2012 at 1:35

GoogleCodeExporter commented 8 years ago
Hm, I was under the impression that URLs couldn't contain non-ascii characters.

A quick google reveals: 
http://stackoverflow.com/questions/2504564/can-http-uris-have-non-ascii-characte
rs

Now, I think one thing cocoa-rest-client could do would be to URL encode any 
non-ascii characters in the request. If you manually url-encode the request 
URL, are you able to retrieve it that way?

Original comment by mike.mat...@gmail.com on 22 Feb 2012 at 3:34

GoogleCodeExporter commented 8 years ago
I was able to fetch the data if I manually url-encoded the parameters. It would 
be awesome if the client could encode them automatically.

You can register domains containing non-ascii characters (http://øl.no) but I 
guess thats a different issue 
http://en.wikipedia.org/wiki/Internationalized_domain_name and not very 
important.

Original comment by frederic...@gmail.com on 22 Feb 2012 at 8:45

GoogleCodeExporter commented 8 years ago
This will be fixed in the next release. URLs will automatically be encoded. 

Original comment by mike.mat...@gmail.com on 25 Feb 2012 at 3:29

GoogleCodeExporter commented 8 years ago
Fixed in version 1.3.2.

Original comment by mike.mat...@gmail.com on 26 Feb 2012 at 12:50