Mercurial Hosting > luan
diff src/org/eclipse/jetty/http/HttpParser.java @ 1028:2ea54e6117c3
remove HttpParser.reset()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 00:23:04 -0600 |
parents | cf0367978d8b |
children | 4e5e9e3c25b3 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpParser.java Wed Nov 02 23:58:37 2016 -0600 +++ b/src/org/eclipse/jetty/http/HttpParser.java Thu Nov 03 00:23:04 2016 -0600 @@ -995,52 +995,6 @@ return _endp.fill(_buffer); } - public void reset() - { - // reset state - _contentView.setGetIndex(_contentView.putIndex()); - _state = _persistent?STATE_START:(_endp.isInputShutdown()?STATE_END:STATE_SEEKING_EOF); - _contentLength = HttpTokens.UNKNOWN_CONTENT; - _contentPosition = 0; - _length = 0; - _responseStatus = 0; - - // Consume LF if CRLF - if (_eol == HttpTokens.CARRIAGE_RETURN && _buffer!=null && _buffer.hasContent() && _buffer.peek() == HttpTokens.LINE_FEED) - _eol=_buffer.get(); - - if (_body!=null && _body.hasContent()) - { - // There is content in the body after the end of the request. - // This is probably a pipelined header of the next request, so we need to - // copy it to the header buffer. - if (_header==null) - getHeaderBuffer(); - else - { - _header.setMarkIndex(-1); - _header.compact(); - } - int take=_header.space(); - if (take>_body.length()) - take=_body.length(); - _body.peek(_body.getIndex(),take); - _body.skip(_header.put(_body.peek(_body.getIndex(),take))); - } - - if (_header!=null) - { - _header.setMarkIndex(-1); - _header.compact(); - } - if (_body!=null) - _body.setMarkIndex(-1); - - _buffer=_header; - returnBuffers(); - } - - public void returnBuffers() { if (_body!=null && !_body.hasContent() && _body.markIndex()==-1 && _buffers!=null)