[
https://issues.apache.org/jira/browse/SHINDIG-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878685#action_12878685
]
Tiago Silveira commented on SHINDIG-1144:
-----------------------------------------
I think the current fix has a bug, in particular this patch here:
http://codereview.appspot.com/1360041/patch/1/2
When the response contains a "result" field, the object is passed normally to
the upper layers, but when the response contains a "data" field, it isn't. If
this reaches production, it will potentially break every gadget running on
orkut that calls open social APIs.
The error is caused by the sendResponse callback declared in
JsonRpcContainer.prototype.requestData. It contains repeated access to
result.data. First,
result = result.result || result.data
and then,
var rawData = response.result || result.data;
var error = response.error;
var errorMessage = "";
Since the variable "result" was already modified at line 10348, "rawData" is
always undefined at line 10367.
> JSON response uses the key "data" instead of "result ", in violation of the
> spec
> --------------------------------------------------------------------------------
>
> Key: SHINDIG-1144
> URL: https://issues.apache.org/jira/browse/SHINDIG-1144
> Project: Shindig
> Issue Type: Bug
> Reporter: Kartick Vaddadi
> Fix For: 2.0.0-RC1
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> According to the JSON-RPC over HTTP spec at
> http://groups.google.com/group/json-rpc/web/json-rpc-1-2-proposal?pli=1#response-procedure-return
> , a JSON-RPC response that did not return an error should use the key
> "result" in the returned JSON object rather than "data".
> The Orkut JSON-RPC service at orkut.com/social/rpc exhibits this bug.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.