Mercurial Hosting > luan
diff src/org/eclipse/jetty/server/AbstractHttpConnection.java @ 1019:f126d30e04a4
start replacing BufferCache with StringCache
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 31 Oct 2016 03:33:42 -0600 |
parents | d2c3ff33387c |
children | 6be43ef1eb96 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/AbstractHttpConnection.java Mon Oct 24 05:37:24 2016 -0600 +++ b/src/org/eclipse/jetty/server/AbstractHttpConnection.java Mon Oct 31 03:33:42 2016 -0600 @@ -446,7 +446,7 @@ _parser); } - private void startRequest(Buffer method, Buffer uri, Buffer version) throws IOException + private void startRequest(String method, Buffer uri, String version) throws IOException { uri=uri.asImmutableBuffer(); @@ -458,7 +458,7 @@ if(_request.getTimeStamp()==0) _request.setTimeStamp(System.currentTimeMillis()); - _request.setMethod(method.toString()); + _request.setMethod(method); try { @@ -487,8 +487,7 @@ } else { - version = HttpVersions.CACHE.get(version); - if (version==null) + if (!HttpVersions.CACHE.contains(version)) throw new HttpException(HttpStatus.BAD_REQUEST_400,null); _version = HttpVersions.CACHE.getOrdinal(version); if (_version <= 0) _version = HttpVersions.HTTP_1_0_ORDINAL; @@ -659,7 +658,7 @@ private class RequestHandler implements HttpParser.EventHandler { @Override - public void startRequest(Buffer method, Buffer uri, Buffer version) throws IOException + public void startRequest(String method, Buffer uri, String version) throws IOException { AbstractHttpConnection.this.startRequest(method, uri, version); }