Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/Request.java @ 1013:6939226e0ac4
simplify URIUtil
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Mon, 24 Oct 2016 01:06:33 -0600 |
| parents | 39154cfa58e4 |
| children | 0114d373748e |
comparison
equal
deleted
inserted
replaced
| 1012:8d0bdd357e6e | 1013:6939226e0ac4 |
|---|---|
| 144 private int _port; | 144 private int _port; |
| 145 private String _protocol = HttpVersions.HTTP_1_1; | 145 private String _protocol = HttpVersions.HTTP_1_1; |
| 146 private String _queryString; | 146 private String _queryString; |
| 147 private String _readerEncoding; | 147 private String _readerEncoding; |
| 148 private String _requestURI; | 148 private String _requestURI; |
| 149 private String _scheme = URIUtil.HTTP; | 149 private String _scheme = "http"; |
| 150 private String _serverName; | 150 private String _serverName; |
| 151 private long _timeStamp; | 151 private long _timeStamp; |
| 152 | 152 |
| 153 private HttpURI _uri; | 153 private HttpURI _uri; |
| 154 | 154 |
| 611 int port = getServerPort(); | 611 int port = getServerPort(); |
| 612 | 612 |
| 613 url.append(scheme); | 613 url.append(scheme); |
| 614 url.append("://"); | 614 url.append("://"); |
| 615 url.append(getServerName()); | 615 url.append(getServerName()); |
| 616 if (_port > 0 && ((scheme.equalsIgnoreCase(URIUtil.HTTP) && port != 80) || (scheme.equalsIgnoreCase(URIUtil.HTTPS) && port != 443))) | 616 if (_port > 0 && ((scheme.equalsIgnoreCase("http") && port != 80) || (scheme.equalsIgnoreCase("https") && port != 443))) |
| 617 { | 617 { |
| 618 url.append(':'); | 618 url.append(':'); |
| 619 url.append(_port); | 619 url.append(_port); |
| 620 } | 620 } |
| 621 | 621 |
| 751 } | 751 } |
| 752 } | 752 } |
| 753 | 753 |
| 754 if (_port <= 0) | 754 if (_port <= 0) |
| 755 { | 755 { |
| 756 if (getScheme().equalsIgnoreCase(URIUtil.HTTPS)) | 756 if (getScheme().equalsIgnoreCase("https")) |
| 757 return 443; | 757 return 443; |
| 758 return 80; | 758 return 80; |
| 759 } | 759 } |
| 760 return _port; | 760 return _port; |
| 761 } | 761 } |
| 880 _pathInfo = null; | 880 _pathInfo = null; |
| 881 _port = 0; | 881 _port = 0; |
| 882 _protocol = HttpVersions.HTTP_1_1; | 882 _protocol = HttpVersions.HTTP_1_1; |
| 883 _queryString = null; | 883 _queryString = null; |
| 884 _requestURI = null; | 884 _requestURI = null; |
| 885 _scheme = URIUtil.HTTP; | 885 _scheme = "http"; |
| 886 _timeStamp = 0; | 886 _timeStamp = 0; |
| 887 _uri = null; | 887 _uri = null; |
| 888 if (_baseParameters != null) | 888 if (_baseParameters != null) |
| 889 _baseParameters.clear(); | 889 _baseParameters.clear(); |
| 890 _parameters = null; | 890 _parameters = null; |
