try {
// If we have only one Adapter deployed, invoke that Adapter directly.
if (!mapMultipleAdapter) {
// Remove the MappingData as we might delegate the request
// to be serviced directly by the WebContainer
final HttpHandler httpHandler = mapper.getHttpHandler();
if (httpHandler != null) {
request.setNote(MAPPING_DATA, null);
// httpHandler.service(request, response);
// return;
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.