diff src/org/eclipse/jetty/http/HttpParser.java @ 1065:158d1e6ac17f

fix JBuffer.compact()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 09 Nov 2016 04:36:05 -0700
parents 0157e92670f5
children 9d357b9e4bcb
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpParser.java	Wed Nov 09 03:09:37 2016 -0700
+++ b/src/org/eclipse/jetty/http/HttpParser.java	Wed Nov 09 04:36:05 2016 -0700
@@ -98,17 +98,17 @@
 	}
 
 	private void clear() {
-		_buffer.clear();
+		_buffer.limit(0);
 		_mark = -1;
 	}
 
 	private void compact() {
 		if( _mark == -1 ) {
-			_buffer.compact();
+			BufferUtil.compact(_buffer);
 		} else if( _mark > 0 ) {
 			int old = _buffer.position();
 			_buffer.position(_mark);
-			_buffer.compact();
+			BufferUtil.compact(_buffer);
 			_buffer.position( old - _mark );
 			_mark = 0;
 		}