290081 Eager consume LF after CR

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@947 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-09-22 03:36:25 +00:00
parent bfd134693a
commit bb13f52da8
3 changed files with 20 additions and 7 deletions

View File

@ -9,6 +9,7 @@ jetty-7.0.1-SNAPSHOT
jetty-7.0.0
+ 289958 StatisticsServlet incorrectly adds StatisticsHandler
+ 290081 Eager consume LF after CR
jetty-7.0.0.RC6 September 18th 2009
+ JETTY-719 Document state machine of jetty http client
@ -39,9 +40,10 @@ jetty-7.0.0.RC6 September 18th 2009
+ 288182 PUT request fails during retry
+ 289221 HttpExchange does not timeout when using blocking connector
+ 289285 org.eclipse.jetty.continuation 7.0.0.RC5 imports the org.mortbay.util.ajax package
+ 289686 HttpExchange.setStatus() has too coarse synchronization
+ Tweak DefaultServletTest under windows
+ Copy VERSION.txt to distro
+ 289686 HttpExchange.setStatus() has too coarse synchronization
+ Remove printlns from jetty-plus
jetty-6.1.20 27 August 2009
+ JETTY-838 Don't log and throw

View File

@ -506,6 +506,9 @@ public class HttpParser implements Parser
_contentPosition=0;
_eol=ch;
if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasContent() && _buffer.peek()==HttpTokens.LINE_FEED)
_eol=_buffer.get();
// We convert _contentLength to an int for this switch statement because
// we don't care about the amount of data available just whether there is some.
switch (_contentLength > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) _contentLength)
@ -766,8 +769,11 @@ public class HttpParser implements Parser
if (ch == HttpTokens.CARRIAGE_RETURN || ch == HttpTokens.LINE_FEED)
{
_eol=ch;
if (_chunkLength == 0)
{
if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasContent() && _buffer.peek()==HttpTokens.LINE_FEED)
_eol=_buffer.get();
_state=STATE_END;
_handler.messageComplete(_contentPosition);
return total_filled;
@ -796,6 +802,8 @@ public class HttpParser implements Parser
_eol=ch;
if (_chunkLength == 0)
{
if (_eol==HttpTokens.CARRIAGE_RETURN && _buffer.hasContent() && _buffer.peek()==HttpTokens.LINE_FEED)
_eol=_buffer.get();
_state=STATE_END;
_handler.messageComplete(_contentPosition);
return total_filled;
@ -919,11 +927,8 @@ public class HttpParser implements Parser
_length=0;
_responseStatus=0;
if (_buffer!=null && _buffer.length()>0 && _eol == HttpTokens.CARRIAGE_RETURN && _buffer.peek() == HttpTokens.LINE_FEED)
{
_buffer.skip(1);
_eol=HttpTokens.LINE_FEED;
}
if (_eol == HttpTokens.CARRIAGE_RETURN && _buffer!=null && _buffer.hasContent() && _buffer.peek() == HttpTokens.LINE_FEED)
_eol=_buffer.get();
if (_body!=null)
{

View File

@ -456,7 +456,13 @@ public class HttpConnection implements Connection
more_in_buffer=false;
}
reset(!more_in_buffer);
if (more_in_buffer)
{
reset(false);
more_in_buffer = _parser.isMoreInBuffer() || _endp.isBufferingInput();
}
else
reset(true);
progress=true;
}