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.

Reply via email to