Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/Request.java @ 1022:3718afd99988
HttpHeaders uses StringCache
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 01 Nov 2016 01:04:46 -0600 |
parents | 6be43ef1eb96 |
children | eca26899c4bc |
comparison
equal
deleted
inserted
replaced
1021:e350c11242be | 1022:3718afd99988 |
---|---|
291 } | 291 } |
292 | 292 |
293 @Override | 293 @Override |
294 public int getContentLength() | 294 public int getContentLength() |
295 { | 295 { |
296 return (int)_connection._requestFields.getLongField(HttpHeaders.CONTENT_LENGTH_BUFFER); | 296 return (int)_connection._requestFields.getLongField(HttpHeaders.CONTENT_LENGTH); |
297 } | 297 } |
298 | 298 |
299 @Override | 299 @Override |
300 public String getContentType() | 300 public String getContentType() |
301 { | 301 { |
302 return _connection._requestFields.getStringField(HttpHeaders.CONTENT_TYPE_BUFFER); | 302 return _connection._requestFields.getStringField(HttpHeaders.CONTENT_TYPE); |
303 } | 303 } |
304 | 304 |
305 @Override | 305 @Override |
306 public String getContextPath() | 306 public String getContextPath() |
307 { | 307 { |
314 if (_cookiesExtracted) | 314 if (_cookiesExtracted) |
315 return _cookies == null?null:_cookies.getCookies(); | 315 return _cookies == null?null:_cookies.getCookies(); |
316 | 316 |
317 _cookiesExtracted = true; | 317 _cookiesExtracted = true; |
318 | 318 |
319 Enumeration enm = _connection._requestFields.getValues(HttpHeaders.COOKIE_BUFFER); | 319 Enumeration enm = _connection._requestFields.getValues(HttpHeaders.COOKIE); |
320 | 320 |
321 // Handle no cookies | 321 // Handle no cookies |
322 if (enm != null) | 322 if (enm != null) |
323 { | 323 { |
324 if (_cookies == null) | 324 if (_cookies == null) |
674 _port = _uri.getPort(); | 674 _port = _uri.getPort(); |
675 if (_serverName != null) | 675 if (_serverName != null) |
676 return _serverName; | 676 return _serverName; |
677 | 677 |
678 // Return host from header field | 678 // Return host from header field |
679 String hostPort = _connection._requestFields.getStringField(HttpHeaders.HOST_BUFFER); | 679 String hostPort = _connection._requestFields.getStringField(HttpHeaders.HOST); |
680 if (hostPort != null) | 680 if (hostPort != null) |
681 { | 681 { |
682 loop: for (int i = hostPort.length(); i-- > 0;) | 682 loop: for (int i = hostPort.length(); i-- > 0;) |
683 { | 683 { |
684 char ch = hostPort.charAt(i); | 684 char ch = hostPort.charAt(i); |