Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.4
-
None
Description
This is for the test java server that was written to test the client.
Suppose you have a method such as testString(theTestString)
If you call it from the javascript like so:
client.testString("hello man");
The string that your server implementation sees will be all crazy and url encoded.
public static void testString(string theTestString) {
// Inside here that string looks like "hello%20man".
}
We need it to be urlencoded when coming across the wire because we're using JSON as the protocol, but once it gets to thrift server code, it needs to be normal.
So what's going on here? Inside of strings (of javascript objects) things like quotes and spaces are escaped. This is fine, but I do not believe that is part of the TJSONProtocol. This is something that is specific to having a js thrift client am I right? So where do we fix this?
Edit: I had proposed a code fix which I do not believe to be the correct solution. Deleting- see future post for what I believe to be correct.
Attachments
Attachments
Issue Links
- is a clone of
-
THRIFT-813 Getting URL encoded strings back on the server side for example: ("@" becomes "%40")
- Closed