File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
this week in the
setHeader() and addHeader() methods
Vijayanarayana Reddy Bhoomireddy
Joined: Apr 22, 2006
Mar 26, 2008 16:48:00
I have a query regarding the setHeader() and addHeader() methods belonging to the
If the header is 'content-type' and already the header exists in the response, then setHeader() will replace the value of the existing content-type with the new value.
But how does the addHeader() method work for content-type? I think browser will be able to recognize only one content type at a time i.e. content-type header cannot have more than one value.
Please let me know how this works or correct me if I'm wrong in my understanding.
Joined: Mar 22, 2005
Mar 26, 2008 17:06:00
Weclome to JavaRanch.
This is one of the things that you can easily
: whether the first header takes precendence, the second, both, none, or something else. What happened when you tried it?
Ping & DNS, my free Android app for network diagnostics
Don't get me started about those stupid
subject: setHeader() and addHeader() methods
request headers question ...
doubt on response.addHeader
addHeader Method confusion
addHeader VS setHeader
problem setting custom header in response
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014