if (b[pos] == (byte) '/') { while ((pos + 1 < end) && (b[pos + 1] == (byte) '/')) { copyBytes(b, pos, pos + 1, end - pos - 1); end--; break; copyBytes(b, start + index, start + index + 2, end - start - index - 2); end = end - 2; copyBytes(b, start + index2, start + index + 3, end - start - index - 3); end = end + index2 - index - 3;
@Override public boolean prepare(org.apache.coyote.Request req, org.apache.coyote.Response res) throws IOException, ServletException { Request request = (Request) req.getNote(ADAPTER_NOTES); Response response = (Response) res.getNote(ADAPTER_NOTES); return postParseRequest(req, request, res, response); }
/** * Parse session id in URL. */ protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request) { // Parse session id from cookies Cookies serverCookies = req.getCookies(); int count = serverCookies.getCookieCount(); if (count <= 0) return; for (int i = 0; i < count; i++) { ServerCookie scookie = serverCookies.getCookie(i); if (scookie.getName().equals(Globals.SESSION_COOKIE_NAME)) { // Override anything requested in the URL if (!request.isRequestedSessionIdFromCookie()) { // Accept only the first session id cookie convertMB(scookie.getValue()); request.setRequestedSessionId(scookie.getValue().toString()); request.setRequestedSessionCookie(true); request.setRequestedSessionURL(false); } else { if (!isSessionIdValid(request, request.getRequestedSessionId())) { // Replace the session id until one is valid convertMB(scookie.getValue()); request.setRequestedSessionId(scookie.getValue().toString()); } } } } }
parsePathParameters(req, request); if (!normalize(req.decodedURI())) { response.sendError(400, "Invalid URI"); convertURI(decodedURI, request); if (!checkNormalize(req.decodedURI())) { response.sendError(400, "Invalid URI"); parseSessionCookiesId(request); parseSessionSslId(request); doConnectorAuthenticationAuthorization(req, request);
parseSessionId(req, request); if (!normalize(req.decodedURI())) { res.setStatus(400); res.setMessage("Invalid URI"); convertURI(decodedURI, request); if (!checkNormalize(req.decodedURI())) { res.setStatus(400); res.setMessage("Invalid URI character encoding"); parseSessionCookiesId(req, request);
boolean postParseSuccess = postParseRequest(req, request, res, response); if (postParseSuccess) { if (request.getAvailable() || (request.getContentLength() > 0 && (!request.isParametersParsed()))) { if (event(req, res, SocketStatus.OPEN_READ)) { comet = true; res.action(ActionCode.COMET_BEGIN, null);
adapter = new CoyoteAdapter(this); protocolHandler.setAdapter(adapter);
postParseSuccess = postParseRequest(req, request, res, response); if (postParseSuccess) { updateWrapperErrorCount(request, response); request.recycle(); response.recycle();
if ( postParseRequest(req, request, res, response, v3Enabled) ) { request.getHost(), request.getContext()); Container container = connector.getContainer(); enteringServletContainer(request, response); try { request.lockSession(); response.getStatus()); } finally { leavingServletContainer(request, response);
parsePathParameters(req, request); if (!normalize(req.decodedURI())) { response.sendError(400, "Invalid URI"); convertURI(decodedURI, request); if (!checkNormalize(req.decodedURI())) { response.sendError(400, "Invalid URI"); parseSessionCookiesId(request); parseSessionSslId(request); doConnectorAuthenticationAuthorization(req, request);
if (!normalize(req.decodedURI())) { res.setStatus(400); res.setMessage("Invalid URI"); convertURI(decodedURI, request); if (!checkNormalize(req.decodedURI())) { res.setStatus(400); res.setMessage("Invalid URI character encoding"); parseSessionId(req, request); } else { request.setRequestedSessionId(null); parseSessionCookiesId(req, request);
/* 260 */ if (postParseRequest(req, request, res, response)) /* 266 */ if (request.getAvailable()) /* 268 */ if (event(req, res, SocketStatus.OPEN)) { /* 269 */ comet = true;
adapter = new CoyoteAdapter(this); protocolHandler.setAdapter(adapter);
postParseSuccess = postParseRequest(req, request, res, response); if (postParseSuccess) { updateWrapperErrorCount(request, response); request.recycle(); response.recycle();
/** * Parse session id in URL. */ protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request) { // Parse session id from cookies Cookies serverCookies = req.getCookies(); int count = serverCookies.getCookieCount(); if (count <= 0) return; String cookieName = request.getContext().getSessionCookie().getName(); for (int i = 0; i < count; i++) { ServerCookie scookie = serverCookies.getCookie(i); if (scookie.getName().equals(cookieName)) { // Override anything requested in the URL if (!request.isRequestedSessionIdFromCookie()) { // Accept only the first session id cookie convertMB(scookie.getValue()); request.setRequestedSessionId(scookie.getValue().toString()); request.setRequestedSessionCookie(true); request.setRequestedSessionURL(false); } else { if (!isSessionIdValid(request, request.getRequestedSessionId())) { // Replace the session id until one is valid convertMB(scookie.getValue()); request.setRequestedSessionId(scookie.getValue().toString()); } } } } }
parsePathParameters(req, request); if (!normalize(req.decodedURI())) { res.setStatus(400); res.setMessage("Invalid URI"); convertURI(decodedURI, request); if (!checkNormalize(req.decodedURI())) { res.setStatus(400); res.setMessage("Invalid URI character encoding"); parseSessionCookiesId(req, request); parseSessionSslId(request);
/* 353 */ parseSessionId(req, request); /* 376 */ if (!normalize(req.decodedURI())) { /* 377 */ res.setStatus(400); /* 378 */ res.setMessage("Invalid URI"); /* 382 */ convertURI(decodedURI, request); /* 472 */ parseSessionCookiesId(req, request);
boolean postParseSuccess = postParseRequest(req, request, res, response); if (postParseSuccess) { if (request.getAvailable() || (request.getContentLength() > 0 && (!request.isParametersParsed()))) { if (event(req, res, SocketStatus.OPEN)) { comet = true; res.action(ActionCode.COMET_BEGIN, null);
if (b[pos] == (byte) '/') { while ((pos + 1 < end) && (b[pos + 1] == (byte) '/')) { copyBytes(b, pos, pos + 1, end - pos - 1); end--; break; copyBytes(b, start + index, start + index + 2, end - start - index - 2); end = end - 2; copyBytes(b, start + index2, start + index + 3, end - start - index - 3); end = end + index2 - index - 3;