diff src/org/eclipse/jetty/http/HttpParser.java @ 1032:eca26899c4bc

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 03 Nov 2016 03:19:50 -0600
parents 4e5e9e3c25b3
children 4ada7a8c128a
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpParser.java	Thu Nov 03 02:04:40 2016 -0600
+++ b/src/org/eclipse/jetty/http/HttpParser.java	Thu Nov 03 03:19:50 2016 -0600
@@ -291,7 +291,7 @@
 						{
 //System.out.println("qqqqqqqqqqqqqqqq a "+_tok0);
 //							_tok0.update(_buffer.markIndex(), _buffer.getIndex() - 1);
-							_tok0 = _buffer.peek(_buffer.markIndex(), _buffer.getIndex() - 1 - _buffer.markIndex()).toString();
+							_tok0 = _buffer.toString(_buffer.markIndex(), _buffer.getIndex() - 1 - _buffer.markIndex());
 //System.out.println("qqqqqqqqqqqqqqqq b "+_tok0);
 							_responseStatus = !HttpVersions.CACHE.contains(_tok0)?-1:0;
 							_state=STATE_SPACE1;
@@ -325,7 +325,7 @@
 						if (ch == HttpTokens.SPACE)
 						{
 //							_tok1.update(_buffer.markIndex(), _buffer.getIndex() - 1);
-							_tok1 = _buffer.peek(_buffer.markIndex(), _buffer.getIndex() - 1 - _buffer.markIndex()).toString();
+							_tok1 = _buffer.toString(_buffer.markIndex(), _buffer.getIndex() - 1 - _buffer.markIndex());
 							_state=STATE_SPACE2;
 							continue;
 						}
@@ -354,7 +354,7 @@
 						if (ch == HttpTokens.SPACE)
 						{
 //							_tok1.update(_buffer.markIndex(), _buffer.getIndex() - 1);
-							_tok1 = _buffer.peek(_buffer.markIndex(), _buffer.getIndex() - 1 - _buffer.markIndex()).toString();
+							_tok1 = _buffer.toString(_buffer.markIndex(), _buffer.getIndex() - 1 - _buffer.markIndex());
 							_state=STATE_SPACE2;
 							continue;
 						}
@@ -611,7 +611,7 @@
 								if (_length > 0) {
 //System.out.println("qqqqqqqqqqqqqqqq c "+_tok0);
 //									_tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-									_tok0 = _buffer.peek(_buffer.markIndex(), _length).toString();
+									_tok0 = _buffer.toString(_buffer.markIndex(), _length);
 //System.out.println("qqqqqqqqqqqqqqqq d "+_tok0);
 								}
 								_eol=ch;
@@ -621,7 +621,7 @@
 								if (_length > 0 && _cached==null) {
 //System.out.println("qqqqqqqqqqqqqqqq e "+_tok0);
 //									_tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-									_tok0 = _buffer.peek(_buffer.markIndex(), _length).toString();
+									_tok0 = _buffer.toString(_buffer.markIndex(), _length);
 //System.out.println("qqqqqqqqqqqqqqqq f "+_tok0);
 								}
 								_length=-1;
@@ -650,7 +650,7 @@
 								if (_length > 0) {
 //System.out.println("qqqqqqqqqqqqqqqq g "+_tok0);
 //									_tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-									_tok0 = _buffer.peek(_buffer.markIndex(),_length).toString();
+									_tok0 = _buffer.toString(_buffer.markIndex(),_length);
 //System.out.println("qqqqqqqqqqqqqqqq h "+_tok0);
 								}
 								_eol=ch;
@@ -660,7 +660,7 @@
 								if (_length > 0 && _cached==null) {
 //System.out.println("qqqqqqqqqqqqqqqq i "+_tok0);
 //									_tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-									_tok0 = _buffer.peek(_buffer.markIndex(),_length).toString();
+									_tok0 = _buffer.toString(_buffer.markIndex(),_length);
 //System.out.println("qqqqqqqqqqqqqqqq j "+_tok0);
 								}
 								_length=-1;
@@ -687,13 +687,13 @@
 								{
 									if (_tok1.length() == 0)
 //										_tok1.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-										_tok1 = _buffer.peek(_buffer.markIndex(), _length).toString();
+										_tok1 = _buffer.toString(_buffer.markIndex(), _length);
 									else
 									{
 										// Continuation line!
 										if (_multiLineValue == null) _multiLineValue = _tok1;
 //										_tok1.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-										_tok1 = _buffer.peek(_buffer.markIndex(), _length).toString();
+										_tok1 = _buffer.toString(_buffer.markIndex(), _length);
 										_multiLineValue += " " + _tok1;
 									}
 								}
@@ -722,13 +722,13 @@
 								{
 									if (_tok1.length() == 0)
 //										_tok1.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-										_tok1 = _buffer.peek(_buffer.markIndex(), _length).toString();
+										_tok1 = _buffer.toString(_buffer.markIndex(), _length);
 									else
 									{
 										// Continuation line!
 										if (_multiLineValue == null) _multiLineValue = _tok1;
 //										_tok1.update(_buffer.markIndex(), _buffer.markIndex() + _length);
-										_tok1 = _buffer.peek(_buffer.markIndex(), _length).toString();
+										_tok1 = _buffer.toString(_buffer.markIndex(), _length);
 										_multiLineValue += " " + _tok1;
 									}
 								}