Mercurial Hosting > luan
diff src/org/eclipse/jetty/http/HttpParser.java @ 1021:e350c11242be
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 31 Oct 2016 22:49:25 -0600 |
parents | 6be43ef1eb96 |
children | 3718afd99988 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpParser.java Mon Oct 31 22:24:41 2016 -0600 +++ b/src/org/eclipse/jetty/http/HttpParser.java Mon Oct 31 22:49:25 2016 -0600 @@ -278,8 +278,8 @@ switch (_state) { case STATE_START: - _contentLength=HttpTokens.UNKNOWN_CONTENT; - _cached=null; + _contentLength = HttpTokens.UNKNOWN_CONTENT; + _cached = null; if (ch > HttpTokens.SPACE || ch<0) { _buffer.mark(); @@ -436,11 +436,11 @@ // handler last header if any if (_cached!=null || _tok0.length() > 0 || _tok1.length() > 0 || _multiLineValue != null) { - Buffer header=_cached!=null?_cached:HttpHeaders.CACHE.lookup(_tok0); - _cached=null; + String header = _cached!=null?_cached.toString():_tok0; + _cached = null; String value = _multiLineValue == null ? _tok1.toString() : _multiLineValue; - int ho=HttpHeaders.CACHE.getOrdinal(header); + int ho = HttpHeaders.CACHE.getOrdinal(header); if (ho >= 0) { int vo; @@ -575,20 +575,20 @@ else { // New header - _length=1; + _length = 1; _buffer.mark(); - _state=STATE_HEADER_NAME; + _state = STATE_HEADER_NAME; // try cached name! if (array!=null) { - _cached=HttpHeaders.CACHE.getBest(array, _buffer.markIndex(), length+1); + _cached = HttpHeaders.CACHE.getBest(array, _buffer.markIndex(), length+1); if (_cached!=null) { - _length=_cached.length(); + _length = _cached.length(); _buffer.setGetIndex(_buffer.markIndex()+_length); - length=_buffer.length(); + length = _buffer.length(); } } } @@ -626,7 +626,7 @@ break; default: { - _cached=null; + _cached = null; if (_length == -1) _buffer.mark(); _length=_buffer.getIndex() - _buffer.markIndex(); @@ -666,7 +666,7 @@ break; default: { - _cached=null; + _cached = null; _length++; } } @@ -1142,7 +1142,7 @@ /** * This is the method called by parser when a HTTP Header name and value is found */ - public void parsedHeader(Buffer name, String value) throws IOException; + public void parsedHeader(String name, String value) throws IOException; /** * This is the method called by parser when the HTTP request line is parsed