shindig-dev mailing list archives

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


Brian Eaton commented on SHINDIG-882:

The original rationale for not returning all headers is here:

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:
>             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.

View raw message