comparison src/org/eclipse/jetty/http/HttpParser.java @ 820:8e9db0bbf4f9

remove org.eclipse.jetty.util.log and upgrade slf4j
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 13 Sep 2016 23:13:06 -0600
parents 3428c60d7cfc
children 220ad4853cda
comparison
equal deleted inserted replaced
819:17bd0b170ed6 820:8e9db0bbf4f9
28 import org.eclipse.jetty.io.EndPoint; 28 import org.eclipse.jetty.io.EndPoint;
29 import org.eclipse.jetty.io.EofException; 29 import org.eclipse.jetty.io.EofException;
30 import org.eclipse.jetty.io.View; 30 import org.eclipse.jetty.io.View;
31 import org.eclipse.jetty.io.bio.StreamEndPoint; 31 import org.eclipse.jetty.io.bio.StreamEndPoint;
32 import org.eclipse.jetty.util.StringUtil; 32 import org.eclipse.jetty.util.StringUtil;
33 import org.eclipse.jetty.util.log.Log; 33 import org.slf4j.Logger;
34 import org.eclipse.jetty.util.log.Logger; 34 import org.slf4j.LoggerFactory;
35 35
36 public class HttpParser implements Parser 36 public class HttpParser implements Parser
37 { 37 {
38 private static final Logger LOG = Log.getLogger(HttpParser.class); 38 private static final Logger LOG = LoggerFactory.getLogger(HttpParser.class);
39 39
40 // States 40 // States
41 public static final int STATE_START=-14; 41 public static final int STATE_START=-14;
42 public static final int STATE_FIELD0=-13; 42 public static final int STATE_FIELD0=-13;
43 public static final int STATE_SPACE1=-12; 43 public static final int STATE_SPACE1=-12;
535 { 535 {
536 _contentLength=BufferUtil.toLong(value); 536 _contentLength=BufferUtil.toLong(value);
537 } 537 }
538 catch(NumberFormatException e) 538 catch(NumberFormatException e)
539 { 539 {
540 LOG.ignore(e); 540 LOG.trace("",e);
541 throw new HttpException(HttpStatus.BAD_REQUEST_400); 541 throw new HttpException(HttpStatus.BAD_REQUEST_400);
542 } 542 }
543 if (_contentLength <= 0) 543 if (_contentLength <= 0)
544 _contentLength=HttpTokens.NO_CONTENT; 544 _contentLength=HttpTokens.NO_CONTENT;
545 } 545 }
1044 int filled = _endp.fill(_buffer); 1044 int filled = _endp.fill(_buffer);
1045 return filled; 1045 return filled;
1046 } 1046 }
1047 catch(IOException e) 1047 catch(IOException e)
1048 { 1048 {
1049 LOG.debug(e); 1049 LOG.debug("",e);
1050 throw (e instanceof EofException) ? e:new EofException(e); 1050 throw (e instanceof EofException) ? e:new EofException(e);
1051 } 1051 }
1052 } 1052 }
1053 1053
1054 return -1; 1054 return -1;