[#1682] HttpVersion.valueOf(...) should not convert to uppercase

This commit is contained in:
Norman Maurer 2013-11-23 20:35:47 +01:00
parent 8b5f8de2ef
commit 0fa6dcefc5

View File

@ -68,18 +68,9 @@ public class HttpVersion implements Comparable<HttpVersion> {
// * http://trac.tools.ietf.org/wg/httpbis/trac/ticket/1
// * 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);
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;
}