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 Wizmerhill <wi...@talath.net> on 2004/07/21 14:01:59 UTC
adding header to html message
Hello,
I'm trying to added "Accept-Encoding: gzip" in a html message after searching
on the net, I find
http://www-106.ibm.com/developerworks/webservices/library/ws-sqzsoap.html.
I search in user mailing and the problem exists since one or two years.
To added the message, I try to adding a header to an html message with the
code :
----------------
Hashtable userHeaderTable = (Hashtable)
call.getMessageContext().getProperty(org.apache.axis.transport.http.HTTPConstants.REQUEST_HEADERS);
if (userHeaderTable == null) {
userHeaderTable = new Hashtable();
}
userHeaderTable.put("Accept-Encoding", "gzip");
call.getMessageContext().setProperty(org.apache.axis.transport.http.HTTPConstants.REQUEST_HEADERS,userHeaderTable);
----------------
But nothing is added. (I use ethereal for that)
I read this in org.apache.axis.transport.http.HTTPSender :
-----SNIP-----
otherHeaders.append(key).append(":").append(me.getValue()).append("\r\n");
-----SNIP-----
if (null != otherHeaders) {
//Add other headers to the end.
//for pre java1.4 support, we have to turn the string buffer
argument into
//a string before appending.
header2.append(otherHeaders.toString());
}
-----SNIP-----
So headers which are not define must be added to the message. No ?
--
Wizmerhill
http://www.talath.net