Use getHeader() instead of getHeaders()
This commit is contained in:
parent
29cafcf842
commit
dd27cd510a
@ -96,8 +96,7 @@ public class DefaultHttpMessage implements HttpMessage {
|
||||
|
||||
@Override
|
||||
public String getHeader(final String name) {
|
||||
List<String> values = getHeaders(name);
|
||||
return values.size() > 0 ? values.get(0) : null;
|
||||
return headers.getHeader(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,8 +79,7 @@ public class DefaultSpdyHeaderBlock implements SpdyHeaderBlock {
|
||||
}
|
||||
|
||||
public String getHeader(final String name) {
|
||||
List<String> values = getHeaders(name);
|
||||
return values.size() > 0 ? values.get(0) : null;
|
||||
return headers.getHeader(name);
|
||||
}
|
||||
|
||||
public List<String> getHeaders(final String name) {
|
||||
|
Loading…
Reference in New Issue
Block a user