res.sendError(HttpServletResponse.SC_NOT_FOUND);
return false;
}
HmuxRequest hmuxRequest = (HmuxRequest) request;
if (!request.getServletPath().equals("")) {
log.warning(L.l("{0} attempt with invalid servlet-path '{1}' from address '{2}'",
_serviceName, request.getServletPath(), request.getRemoteAddr()));
res.sendError(HttpServletResponse.SC_NOT_FOUND);
return false;
}
if (request.getPathInfo() != null) {
log.warning(L.l("{0} attempt with invalid path-info '{1}' from address '{2}'",
_serviceName, request.getPathInfo(), request.getRemoteAddr()));
res.sendError(HttpServletResponse.SC_NOT_FOUND);
return false;
}
// The remote test needs to be last to allow the other QA to work properly
// XXX: this should be configurable, i.e. setReadConstraints and setWriteConstraints
String remoteAddr = hmuxRequest.getRemoteAddr();
boolean isValidAddr = false;
for (int i = 0; i < _allowedNetworks.length; i++) {
if (_allowedNetworks[i].isMatch(remoteAddr))
isValidAddr = true;