comparison src/org/eclipse/jetty/http/HttpParser.java @ 1017:d2c3ff33387c

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 24 Oct 2016 01:56:08 -0600
parents 8c13b9224cff
children f126d30e04a4
comparison
equal deleted inserted replaced
1016:8c13b9224cff 1017:d2c3ff33387c
289 289
290 case STATE_FIELD0: 290 case STATE_FIELD0:
291 if (ch == HttpTokens.SPACE) 291 if (ch == HttpTokens.SPACE)
292 { 292 {
293 _tok0.update(_buffer.markIndex(), _buffer.getIndex() - 1); 293 _tok0.update(_buffer.markIndex(), _buffer.getIndex() - 1);
294 _responseStatus=HttpVersions.CACHE.get(_tok0)==null?-1:0; 294 _responseStatus = HttpVersions.CACHE.get(_tok0)==null?-1:0;
295 _state=STATE_SPACE1; 295 _state=STATE_SPACE1;
296 continue; 296 continue;
297 } 297 }
298 else if (ch < HttpTokens.SPACE && ch>=0) 298 else if (ch < HttpTokens.SPACE && ch>=0)
299 { 299 {
965 965
966 public void reset() 966 public void reset()
967 { 967 {
968 // reset state 968 // reset state
969 _contentView.setGetIndex(_contentView.putIndex()); 969 _contentView.setGetIndex(_contentView.putIndex());
970 _state=_persistent?STATE_START:(_endp.isInputShutdown()?STATE_END:STATE_SEEKING_EOF); 970 _state = _persistent?STATE_START:(_endp.isInputShutdown()?STATE_END:STATE_SEEKING_EOF);
971 _contentLength=HttpTokens.UNKNOWN_CONTENT; 971 _contentLength = HttpTokens.UNKNOWN_CONTENT;
972 _contentPosition=0; 972 _contentPosition = 0;
973 _length=0; 973 _length = 0;
974 _responseStatus=0; 974 _responseStatus = 0;
975 975
976 // Consume LF if CRLF 976 // Consume LF if CRLF
977 if (_eol == HttpTokens.CARRIAGE_RETURN && _buffer!=null && _buffer.hasContent() && _buffer.peek() == HttpTokens.LINE_FEED) 977 if (_eol == HttpTokens.CARRIAGE_RETURN && _buffer!=null && _buffer.hasContent() && _buffer.peek() == HttpTokens.LINE_FEED)
978 _eol=_buffer.get(); 978 _eol=_buffer.get();
979 979