jdk/src/share/classes/sun/net/httpserver/ServerImpl.java
changeset 1511 65ddd8f149f3
parent 1247 b4c26443dee5
child 2624 1ae5a9028dd4
equal deleted inserted replaced
1510:e747d3193ef2 1511:65ddd8f149f3
   468                 URI uri = new URI (uriStr);
   468                 URI uri = new URI (uriStr);
   469                 start = space+1;
   469                 start = space+1;
   470                 String version = requestLine.substring (start);
   470                 String version = requestLine.substring (start);
   471                 Headers headers = req.headers();
   471                 Headers headers = req.headers();
   472                 String s = headers.getFirst ("Transfer-encoding");
   472                 String s = headers.getFirst ("Transfer-encoding");
   473                 int clen = 0;
   473                 long clen = 0L;
   474                 if (s !=null && s.equalsIgnoreCase ("chunked")) {
   474                 if (s !=null && s.equalsIgnoreCase ("chunked")) {
   475                     clen = -1;
   475                     clen = -1L;
   476                 } else {
   476                 } else {
   477                     s = headers.getFirst ("Content-Length");
   477                     s = headers.getFirst ("Content-Length");
   478                     if (s != null) {
   478                     if (s != null) {
   479                         clen = Integer.parseInt (s);
   479                         clen = Long.parseLong(s);
   480                     }
   480                     }
   481                 }
   481                 }
   482                 ctx = contexts.findContext (protocol, uri.getPath());
   482                 ctx = contexts.findContext (protocol, uri.getPath());
   483                 if (ctx == null) {
   483                 if (ctx == null) {
   484                     reject (Code.HTTP_NOT_FOUND,
   484                     reject (Code.HTTP_NOT_FOUND,