Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/Request.java @ 898:39c12b2306a2
remove _useDNS
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 06 Oct 2016 23:57:43 -0600 |
parents | df84a1741687 |
children | 1fc8ee20cb18 |
comparison
equal
deleted
inserted
replaced
897:821e4634b787 | 898:39c12b2306a2 |
---|---|
153 private boolean _newContext; | 153 private boolean _newContext; |
154 private String _contextPath; | 154 private String _contextPath; |
155 private CookieCutter _cookies; | 155 private CookieCutter _cookies; |
156 private boolean _cookiesExtracted = false; | 156 private boolean _cookiesExtracted = false; |
157 private DispatcherType _dispatcherType; | 157 private DispatcherType _dispatcherType; |
158 private boolean _dns = false; | |
159 private EndPoint _endp; | 158 private EndPoint _endp; |
160 private boolean _handled = false; | 159 private boolean _handled = false; |
161 private int _inputState = __NONE; | 160 private int _inputState = __NONE; |
162 private String _method; | 161 private String _method; |
163 private MultiMap<String> _parameters; | 162 private MultiMap<String> _parameters; |
689 */ | 688 */ |
690 public String getLocalName() | 689 public String getLocalName() |
691 { | 690 { |
692 if (_endp == null) | 691 if (_endp == null) |
693 return null; | 692 return null; |
694 if (_dns) | |
695 return _endp.getLocalHost(); | |
696 | 693 |
697 String local = _endp.getLocalAddr(); | 694 String local = _endp.getLocalAddr(); |
698 if (local != null && local.indexOf(':') >= 0) | 695 if (local != null && local.indexOf(':') >= 0) |
699 local = "[" + local + "]"; | 696 local = "[" + local + "]"; |
700 return local; | 697 return local; |
885 /* | 882 /* |
886 * @see javax.servlet.ServletRequest#getRemoteHost() | 883 * @see javax.servlet.ServletRequest#getRemoteHost() |
887 */ | 884 */ |
888 public String getRemoteHost() | 885 public String getRemoteHost() |
889 { | 886 { |
890 if (_dns) | |
891 { | |
892 if (_remoteHost != null) | |
893 { | |
894 return _remoteHost; | |
895 } | |
896 return _endp == null?null:_endp.getRemoteHost(); | |
897 } | |
898 return getRemoteAddr(); | 887 return getRemoteAddr(); |
899 } | 888 } |
900 | 889 |
901 /* ------------------------------------------------------------ */ | 890 /* ------------------------------------------------------------ */ |
902 /* | 891 /* |
1518 protected final void setConnection(AbstractHttpConnection connection) | 1507 protected final void setConnection(AbstractHttpConnection connection) |
1519 { | 1508 { |
1520 _connection = connection; | 1509 _connection = connection; |
1521 _async.setConnection(connection); | 1510 _async.setConnection(connection); |
1522 _endp = connection.getEndPoint(); | 1511 _endp = connection.getEndPoint(); |
1523 _dns = connection.getResolveNames(); | |
1524 } | 1512 } |
1525 | 1513 |
1526 /* ------------------------------------------------------------ */ | 1514 /* ------------------------------------------------------------ */ |
1527 /* | 1515 /* |
1528 * @see javax.servlet.ServletRequest#getContentType() | 1516 * @see javax.servlet.ServletRequest#getContentType() |