return new HttpHandlerCallable(httpHandler,
request, response);
}
}
final DataChunk decodedURI = request.getRequest()
.getRequestURIRef().getDecodedRequestURIBC(isAllowEncodedSlash());
mappingData = request.getNote(MAPPING_DATA);
if (mappingData == null) {
mappingData = new MappingData();
request.setNote(MAPPING_DATA, mappingData);
} else {
mappingData.recycle();
}
HttpHandler httpHandler;
final CharChunk decodedURICC = decodedURI.getCharChunk();
final int semicolon = decodedURICC.indexOf(';', 0);
// Map the request without any trailling.
httpHandler = mapUriWithSemicolon(request, decodedURI,
semicolon, mappingData);
if (httpHandler == null || httpHandler instanceof ContainerMapper) {
String ext = decodedURI.toString();
String type = "";
if (ext.lastIndexOf(".") > 0) {
ext = "*" + ext.substring(ext.lastIndexOf("."));
type = ext.substring(ext.lastIndexOf(".") + 1);
}
if (!MimeType.contains(type) && !"/".equals(ext)) {
initializeFileURLPattern(ext);
mappingData.recycle();
httpHandler = mapUriWithSemicolon(request, decodedURI,
semicolon, mappingData);
} else {
// super.service(request, response);
// return;
return new SuperCallable(request, response);
}
}
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "Request: {0} was mapped to Adapter: {1}",
new Object[]{decodedURI.toString(), httpHandler});
}
// The Adapter used for servicing static pages doesn't decode the
// request by default, hence do not pass the undecoded request.
if (httpHandler == null || httpHandler instanceof ContainerMapper) {