Overall cleanup of 6602fcf54fafeae1d3d0f57734d60f81edc2e0ba
This commit is contained in:
parent
32d82fa259
commit
83296ca9ac
@ -488,7 +488,11 @@ public abstract class HttpObjectDecoder extends ReplayingDecoder<State> {
|
||||
do {
|
||||
char firstChar = line.charAt(0);
|
||||
if (name != null && (firstChar == ' ' || firstChar == '\t')) {
|
||||
value = value.toString() + ' ' + line.toString().trim();
|
||||
StringBuilder buf = new StringBuilder(value.length() + line.length() + 1);
|
||||
buf.append(value);
|
||||
buf.append(' ');
|
||||
buf.append(line.toString().trim());
|
||||
value = buf.toString();
|
||||
} else {
|
||||
if (name != null) {
|
||||
headers.add(name, value);
|
||||
@ -718,9 +722,7 @@ public abstract class HttpObjectDecoder extends ReplayingDecoder<State> {
|
||||
}
|
||||
|
||||
protected TooLongFrameException newException(int maxLength) {
|
||||
return new TooLongFrameException(
|
||||
"HTTP header is larger than " + maxLength +
|
||||
" bytes.");
|
||||
return new TooLongFrameException("HTTP header is larger than " + maxLength + " bytes.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -738,9 +740,7 @@ public abstract class HttpObjectDecoder extends ReplayingDecoder<State> {
|
||||
|
||||
@Override
|
||||
protected TooLongFrameException newException(int maxLength) {
|
||||
return new TooLongFrameException(
|
||||
"An HTTP line is larger than " + maxLength +
|
||||
" bytes.");
|
||||
return new TooLongFrameException("An HTTP line is larger than " + maxLength + " bytes.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user