@Override
	public Response onRequest(Request request) {
		if (null != this.requestLog) {
			this.requestLog.add(request);
		}
		if (null != staticBaseDir) {
			String filePath = request.getPath().endsWith("/") ? request.getPath() + "index.html" : request.getPath();
			File responseFile = new File(staticBaseDir, filePath);
			if (responseFile.isFile()) {
				return new ReturnValueSettableResponse(new ReturnValue(200, responseFile, FileUtil.getMimeType(responseFile)), request);
			}
		}
		ReturnValue returnValue = returnMap.get(request.getPath());
		if (null != returnValue) {
			return new ReturnValueSettableResponse(returnValue, request);
		} else if (request.getPath().endsWith("/") && returnMap.containsKey(request.getPath() + "index.html")) {
			return new ReturnValueSettableResponse(returnValue, request);
		}
		return new Response404();
	}