case REQ_REMOTEPORT_ATTRIBUTE: {
// Get remote port
if (remotePort == -1 && (socketRef != 0)) {
try {
long sa = Address.get(Socket.APR_REMOTE, socketRef);
Sockaddr addr = Address.getInfo(sa);
remotePort = addr.port;
} catch (Exception e) {
log.warn(sm.getString("http11processor.socket.info"), e);
}
}
request.setRemotePort(remotePort);
break;
}
case REQ_LOCALPORT_ATTRIBUTE: {
// Get local port
if (localPort == -1 && (socketRef != 0)) {
try {
long sa = Address.get(Socket.APR_LOCAL, socketRef);
Sockaddr addr = Address.getInfo(sa);
localPort = addr.port;
} catch (Exception e) {
log.warn(sm.getString("http11processor.socket.info"), e);
}
}