You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Fred Carter <fr...@amberpoint.com> on 2004/03/22 22:58:22 UTC
Obtaining http (or other transport) headers
Regarding Axis 1.1
When on the server side, I can easily get http headers via the
HTTPConstants.MC_HTTP_SERVLETREQUEST property, and set response
properties via the HTTPConstants.MC_HTTP_SERVLET_RESPONSE property.
That's OK.
When operating as a client, things are not quite so rosy. One appears
to set headers via the HTTPConstants.REQUEST_HEADERS property. However,
I don't see a viable way to find http headers in the response.
Symmetrically, the HTTPConstants.RESPONSE_HEADERS would appear to be the
place to look, but that property isn't set.
Spelunking through the code, HTTPSender.invoke() creates a headers
hashtable & escorts the header collection from header reading through
message reading, eventually snarfing necessary cookies. But it does not
appear to save the response header hashtable in the message context in a
way that it would be available to the client caller (vile though that
may be!). (I haven't explored through the Commons... version of things
yet.)
So, is this a design, oversight, etc. Naively, 'twould appear that
saving the created hashtable into the messageContext property
HTTPConstants.RESPONSE_HEADERS would be reasonable, and fairly trivial
to do (appears to be a 1-line change). However, I didn't know enough
about the intent of this property to know if it was the semantically
correct thing.
Thanx in advance...
Re: Obtaining http (or other transport) headers
Posted by Davanum Srinivas <di...@yahoo.com>.
Fred,
+1 to fix this. Please submit a patch in JIRA (http://issues.apache.org/jira). I was infact
reviewing 2 more bugs regarding cookies. if i could get one patch for all three it would be
PERFECT :) :)
http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-986
http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-895
thanks,
dims
--- Fred Carter <fr...@amberpoint.com> wrote:
> Regarding Axis 1.1
>
> When on the server side, I can easily get http headers via the
> HTTPConstants.MC_HTTP_SERVLETREQUEST property, and set response
> properties via the HTTPConstants.MC_HTTP_SERVLET_RESPONSE property.
> That's OK.
>
> When operating as a client, things are not quite so rosy. One appears
> to set headers via the HTTPConstants.REQUEST_HEADERS property. However,
> I don't see a viable way to find http headers in the response.
> Symmetrically, the HTTPConstants.RESPONSE_HEADERS would appear to be the
> place to look, but that property isn't set.
>
> Spelunking through the code, HTTPSender.invoke() creates a headers
> hashtable & escorts the header collection from header reading through
> message reading, eventually snarfing necessary cookies. But it does not
> appear to save the response header hashtable in the message context in a
> way that it would be available to the client caller (vile though that
> may be!). (I haven't explored through the Commons... version of things
> yet.)
>
> So, is this a design, oversight, etc. Naively, 'twould appear that
> saving the created hashtable into the messageContext property
> HTTPConstants.RESPONSE_HEADERS would be reasonable, and fairly trivial
> to do (appears to be a 1-line change). However, I didn't know enough
> about the intent of this property to know if it was the semantically
> correct thing.
>
> Thanx in advance...
>
>
>
>
=====
Davanum Srinivas - http://webservices.apache.org/~dims/