Skip to content
Snippets Groups Projects
Commit 63e1f75d authored by srosse's avatar srosse
Browse files

Merge OpenOLAT 10.5 to OpenOLAT 11.0 with 24adaaaf61e59c69ab84e444a70b08bbf172a5f3

parents 592e26ac 8e785cf5
No related branches found
No related tags found
No related merge requests found
......@@ -68,16 +68,13 @@ public class MapperDispatcher extends LogDelegator implements Dispatcher {
*/
@Override
public void execute(HttpServletRequest hreq, HttpServletResponse hres) throws IOException {
if(!hreq.isRequestedSessionIdValid()) {
String pathInfo = hreq.getRequestURI();
DispatcherModule.sendForbidden(pathInfo, hres);
return;
}
String pathInfo = DispatcherModule.subtractContextPath(hreq);
final boolean isDebugLog = isLogDebugEnabled();
StringBuilder debugMsg = null;
long debug_start = 0;
if (isDebugLog) {
debug_start = System.currentTimeMillis();
debugMsg = new StringBuilder("::mprex:");
}
// e.g. non-cacheable: 23423/bla/blu.html
// e.g. cacheable: my.mapper.path/bla/blu.html
String subInfo = pathInfo.substring(DispatcherModule.PATH_MAPPED.length());
......@@ -90,6 +87,7 @@ public class MapperDispatcher extends LogDelegator implements Dispatcher {
smappath = subInfo.substring(0, slashPos);
}
//legacy???
DBFactory.getInstance().commitAndCloseSession();
......@@ -115,12 +113,5 @@ public class MapperDispatcher extends LogDelegator implements Dispatcher {
// /bla/blu.html
MediaResource mr = m.handle(mod, hreq);
ServletUtil.serveResource(hreq, hres, mr);
if (isDebugLog) {
long afterserved = System.currentTimeMillis();
long syncIntroDiff = afterserved - debug_start;
debugMsg.append("nanoseconds:").append(syncIntroDiff);
logDebug(debugMsg.toString());
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment