request.setRemotePort(0);
} else {
if (socketWrapper.getRemotePort() == -1) {
try {
long sa = Address.get(Socket.APR_REMOTE, socketRef);
Sockaddr addr = Address.getInfo(sa);
socketWrapper.setRemotePort(addr.port);
} catch (Exception e) {
log.warn(sm.getString("http11processor.socket.info"), e);
}
}
request.setRemotePort(socketWrapper.getRemotePort());
}
break;
}
case REQ_LOCALPORT_ATTRIBUTE: {
if (socketRef == 0) {
request.setLocalPort(0);
} else {
if (socketWrapper.getLocalPort() == -1) {
try {
long sa = Address.get(Socket.APR_LOCAL, socketRef);
Sockaddr addr = Address.getInfo(sa);
socketWrapper.setLocalPort(addr.port);
} catch (Exception e) {
log.warn(sm.getString("http11processor.socket.info"), e);
}
}