Overall cleanup of cf4c464d99
This commit is contained in:
parent
cf4c464d99
commit
a653a8ecf4
@ -502,7 +502,11 @@ public abstract class HttpObjectDecoder extends ReplayingDecoder<State> {
|
|||||||
do {
|
do {
|
||||||
char firstChar = line.charAt(0);
|
char firstChar = line.charAt(0);
|
||||||
if (name != null && (firstChar == ' ' || firstChar == '\t')) {
|
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 {
|
} else {
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
headers.add(name, value);
|
headers.add(name, value);
|
||||||
@ -732,9 +736,7 @@ public abstract class HttpObjectDecoder extends ReplayingDecoder<State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected TooLongFrameException newException(int maxLength) {
|
protected TooLongFrameException newException(int maxLength) {
|
||||||
return new TooLongFrameException(
|
return new TooLongFrameException("HTTP header is larger than " + maxLength + " bytes.");
|
||||||
"HTTP header is larger than " + maxLength +
|
|
||||||
" bytes.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -752,9 +754,7 @@ public abstract class HttpObjectDecoder extends ReplayingDecoder<State> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected TooLongFrameException newException(int maxLength) {
|
protected TooLongFrameException newException(int maxLength) {
|
||||||
return new TooLongFrameException(
|
return new TooLongFrameException("An HTTP line is larger than " + maxLength + " bytes.");
|
||||||
"An HTTP line is larger than " + maxLength +
|
|
||||||
" bytes.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user