]> WPIA git - gigi.git/blobdiff - lib/jetty/org/eclipse/jetty/http/HttpVersion.java
updating jetty to jetty-9.2.16.v2016040
[gigi.git] / lib / jetty / org / eclipse / jetty / http / HttpVersion.java
index eb889e56a32712edf52c178bdc602210a0131262..ddedc274710b380d7ba1cb2b6fd023b89659c925 100644 (file)
@@ -1,6 +1,6 @@
 //
 //  ========================================================================
-//  Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
+//  Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
 //  ------------------------------------------------------------------------
 //  All rights reserved. This program and the accompanying materials
 //  are made available under the terms of the Eclipse Public License v1.0
@@ -31,7 +31,7 @@ public enum HttpVersion
     HTTP_0_9("HTTP/0.9",9),
     HTTP_1_0("HTTP/1.0",10),
     HTTP_1_1("HTTP/1.1",11),
-    HTTP_2_0("HTTP/2.0",20);
+    HTTP_2("HTTP/2.0",20);
 
     /* ------------------------------------------------------------ */
     public final static Trie<HttpVersion> CACHE= new ArrayTrie<HttpVersion>();
@@ -74,7 +74,7 @@ public enum HttpVersion
                     switch(bytes[position+7])
                     {
                         case '0':
-                            return HTTP_2_0;
+                            return HTTP_2;
                     }
                     break;
             }
@@ -166,6 +166,7 @@ public enum HttpVersion
             case 9: return HttpVersion.HTTP_0_9;
             case 10: return HttpVersion.HTTP_1_0;
             case 11: return HttpVersion.HTTP_1_1;
+            case 20: return HttpVersion.HTTP_2;
             default: throw new IllegalArgumentException();
         }
     }