- remove unnecessary code from BIO
- improve comment for all
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1132356 13f79535-47bb-0310-9956-
ffa450edef68
if (valueMB == null || valueMB.isNull()) {
// HTTP/1.0
- // Default is what the socket tells us. Overridden if a host is
- // found/parsed
+ // If no host header, use the port info from the endpoint
+ // The host will be obtained lazily from the socket if required
+ // using ActionCode#REQ_LOCAL_NAME_ATTRIBUTE
request.setServerPort(endpoint.getPort());
return;
}
if (valueMB == null || valueMB.isNull()) {
// HTTP/1.0
- // Default is what the socket tells us. Overridden if a host is
- // found/parsed
+ // If no host header, use the port info from the endpoint
+ // The host will be obtained lazily from the socket if required
+ // using ActionCode#REQ_LOCAL_NAME_ATTRIBUTE
request.setServerPort(endpoint.getPort());
return;
}
if (valueMB == null || valueMB.isNull()) {
// HTTP/1.0
- // Default is what the socket tells us. Overridden if a host is
- // found/parsed
+ // If no host header, use the port info from the endpoint
+ // The host will be obtained lazily from the socket if required
+ // using ActionCode#REQ_LOCAL_NAME_ATTRIBUTE
request.setServerPort(endpoint.getPort());
- InetAddress localAddress = socket.getSocket().getLocalAddress();
- // Setting the socket-related fields. The adapter doesn't know
- // about socket.
- request.serverName().setString(localAddress.getHostName());
return;
}