ByteString misses encountered during forward port
Motivation: While forward porting https://github.com/netty/netty/pull/3579 there were a few areas that had not been previously back ported. Modifications: Backport the missed areas to ensure consistency. Result: More consistent 4.1 and master branches.
This commit is contained in:
parent
9a7a85dbe5
commit
e36c1436b8
@ -150,6 +150,8 @@ public class DefaultHttpHeaders extends HttpHeaders {
|
|||||||
if ((c & HIGHEST_INVALID_VALUE_CHAR_MASK) == 0) {
|
if ((c & HIGHEST_INVALID_VALUE_CHAR_MASK) == 0) {
|
||||||
// Check the absolutely prohibited characters.
|
// Check the absolutely prohibited characters.
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
case 0x0: // NULL
|
||||||
|
throw new IllegalArgumentException("a header value contains a prohibited character '\0': " + seq);
|
||||||
case 0x0b: // Vertical tab
|
case 0x0b: // Vertical tab
|
||||||
throw new IllegalArgumentException("a header value contains a prohibited character '\\v': " + seq);
|
throw new IllegalArgumentException("a header value contains a prohibited character '\\v': " + seq);
|
||||||
case '\f':
|
case '\f':
|
||||||
|
@ -377,7 +377,7 @@ public final class HttpUtil {
|
|||||||
throw streamError(streamId, PROTOCOL_ERROR,
|
throw streamError(streamId, PROTOCOL_ERROR,
|
||||||
"Invalid HTTP/2 header '%s' encountered in translation to HTTP/1.x", translatedName);
|
"Invalid HTTP/2 header '%s' encountered in translation to HTTP/1.x", translatedName);
|
||||||
} else {
|
} else {
|
||||||
output.add(translatedName.toString(), value);
|
output.add(new AsciiString(translatedName.array(), false), new AsciiString(value.array(), false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user