shindig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Eaton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SHINDIG-882) Get complete set of response headers.
Date Thu, 22 Jan 2009 19:41:59 GMT

    [ https://issues.apache.org/jira/browse/SHINDIG-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666269#action_12666269
] 

Brian Eaton commented on SHINDIG-882:
-------------------------------------

The original rationale for not returning all headers is here: http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/51b016b80e9d21e6

Almost no gadgets actually need any headers, and even the gadgets that do need some headers
don't need all of them.  It would be wasteful to return all of that data.

> Get complete set of response headers.
> -------------------------------------
>
>                 Key: SHINDIG-882
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-882
>             Project: Shindig
>          Issue Type: Wish
>          Components: Common Components (Java)
>            Reporter: Andrey Parfonov
>
> We are trying to use gadget for WebDAV browsing. Real HTTP method passed via 'X-HTTP-Method
Override' (for example OPTIONS) and fake HTTP method (for example POST). Sever replace POST
to OPTIONS before makes WebDAV request and return correct response with header 'Allow'. But
this is important for WebDAV header is missing in method org.apache.shindig.gadgets.FetchResponseUtils#getResponseAsJson.

> Code :
>     JSONObject resp = new JSONObject();
>     resp.put("rc", response.getHttpStatusCode());
>     resp.put("body", body);
>     JSONObject headers = new JSONObject();
>     addHeaders(headers, response, "set-cookie");
>     addHeaders(headers, response, "location");
>     resp.put("headers", headers);
>     // Merge in additional response data
>     for (Map.Entry<String, String> entry : response.getMetadata().entrySet()) {
>       resp.put(entry.getKey(), entry.getValue());
>     }
>     return resp;
> According to code, only headers "set-cookie",  "location" being add to JSON response.
Can someone explain what is realy problem add complete set of response headers? And why this
restriction applied ?

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


Mime
View raw message