[#1682] HttpVersion.valueOf(...) should not convert to uppercase
This commit is contained in:
parent
8b5f8de2ef
commit
0fa6dcefc5
@ -68,19 +68,10 @@ public class HttpVersion implements Comparable<HttpVersion> {
|
|||||||
// * http://trac.tools.ietf.org/wg/httpbis/trac/ticket/1
|
// * http://trac.tools.ietf.org/wg/httpbis/trac/ticket/1
|
||||||
// * http://trac.tools.ietf.org/wg/httpbis/trac/wiki
|
// * http://trac.tools.ietf.org/wg/httpbis/trac/wiki
|
||||||
//
|
//
|
||||||
// TODO: Remove the uppercase conversion in 4.1.0 as the RFC state it must be HTTP (uppercase)
|
|
||||||
// See https://github.com/netty/netty/issues/1682
|
|
||||||
|
|
||||||
HttpVersion version = version0(text);
|
HttpVersion version = version0(text);
|
||||||
if (version == null) {
|
if (version == null) {
|
||||||
text = text.toUpperCase();
|
|
||||||
// try again after convert to uppercase
|
|
||||||
version = version0(text);
|
|
||||||
if (version == null) {
|
|
||||||
// still no match, construct a new one
|
|
||||||
version = new HttpVersion(text, true);
|
version = new HttpVersion(text, true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user