[ 
https://issues.apache.org/jira/browse/THRIFT-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905215#action_12905215
 ] 

Jordan commented on THRIFT-885:
-------------------------------

Roger, 
I noted in one of my comments that I tried your fix and it didn't work. Please 
take a look at my patch. I already tried what you have posted as a patch and it 
doesn't work when you have nested quotes inside the text (or newlines etc.)
My patch deals with these by escaping them into standard json strings in 
accordance with www.json.org.

I even made a test case to ensure that it works properly. Can you please take a 
look at it and integrate it into the source code?
Thanks.

> Url encoded strings never get decoded? How do we fix this?
> ----------------------------------------------------------
>
>                 Key: THRIFT-885
>                 URL: https://issues.apache.org/jira/browse/THRIFT-885
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler
>            Reporter: Jordan
>         Attachments: charEscapingFix.diff, 
> THRIFT-885_remove_encodeURIComponent.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to