[jboss-jira] [JBoss JIRA] Commented: (JBREM-728) Improve access to HTTP response headers
Ron Sigal (JIRA)
jira-events at lists.jboss.org
Fri Nov 23 01:48:19 EST 2007
[ http://jira.jboss.com/jira/browse/JBREM-728?page=comments#action_12388855 ]
Ron Sigal commented on JBREM-728:
---------------------------------
Proposed solution: Add the following line to org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection():
metadata.put(HTTPMetadataConstants.RESPONSE_HEADERS, conn.getHeaderFields());
(where the actual value of HTTPMetadataConstants.RESPONSE_HEADERS is "ResponseHeaders". As a result, there will be a single entry in the metadata map passed to org.jboss.remoting.Client.invoke() with the map of all response headers
> Improve access to HTTP response headers
> ---------------------------------------
>
> Key: JBREM-728
> URL: http://jira.jboss.com/jira/browse/JBREM-728
> Project: JBoss Remoting
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 2.2.0.Alpha7
> Reporter: Thomas Diesler
> Assigned To: Ron Sigal
> Fix For: 2.4.0.Beta1 (Pinto)
>
>
> JAXWS needs access to the HTTP response headers
> /**
> * Standard property: HTTP response headers.
> * <p>Type: java.util.Map<java.lang.String, java.util.List<java.lang.String>>
> */
> public static final String HTTP_RESPONSE_HEADERS = "javax.xml.ws.http.response.headers";
> Currently remoting copies these headers to the metadata and I can access them doing a little guess work like this
> // Get the HTTP response headers
> Map<String, List> headers = new HashMap<String, List>();
> for (Map.Entry en : msgContext.entrySet())
> {
> if (en.getKey() instanceof String && en.getValue() instanceof List)
> headers.put((String)en.getKey(), (List)en.getValue());
> }
> msgContext.put(MessageContext.HTTP_RESPONSE_HEADERS, headers);
> I suggest remoting copies the concept of accessing the headers through a single property
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list