Added HttpMessage.removeHeader()

This commit is contained in:
Trustin Lee 2008-12-01 09:34:45 +00:00
parent ec33095eb7
commit 5bed9f4bc4
2 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,10 @@ public class DefaultHttpMessage implements HttpMessage {
headers.put(name, values);
}
public void removeHeader(final String name) {
headers.remove(name);
}
public int getContentLength() {
List<String> contentLength = headers.get(HttpHeaders.CONTENT_LENGTH);
if (contentLength != null && contentLength.size() > 0) {

View File

@ -50,6 +50,8 @@ public interface HttpMessage {
void setHeader(String name, List<String> values);
void removeHeader(String name);
int getContentLength();
void setContent(ChannelBuffer content);