View | Details | Raw Unified | Return to bug 51940
Collapse All | Expand All

(-)java/org/apache/catalina/authenticator/FormAuthenticator.java (-2 / +14 lines)
Lines 315-320 Link Here
315
     */
315
     */
316
    protected void forwardToLoginPage(Request request, Response response,
316
    protected void forwardToLoginPage(Request request, Response response,
317
            LoginConfig config) throws IOException {
317
            LoginConfig config) throws IOException {
318
319
        if (log.isDebugEnabled())
320
            log.debug("Forwarding request " + request.getMethod()
321
            + " '" + request.getRequestURI() + "' to the login page as GET '"
322
                    + context.getServletContext().getContextPath()
323
                    + config.getLoginPage() + "'");
324
325
        request.getCoyoteRequest().method().setString("GET");
326
        request.setMethod("GET");
327
318
        RequestDispatcher disp =
328
        RequestDispatcher disp =
319
            context.getServletContext().getRequestDispatcher
329
            context.getServletContext().getRequestDispatcher
320
            (config.getLoginPage());
330
            (config.getLoginPage());
Lines 447-453 Link Here
447
        request.getCoyoteRequest().getParameters().setQueryStringEncoding(
457
        request.getCoyoteRequest().getParameters().setQueryStringEncoding(
448
                request.getConnector().getURIEncoding());
458
                request.getConnector().getURIEncoding());
449
        if ("POST".equalsIgnoreCase(saved.getMethod())) {
459
        if ("POST".equalsIgnoreCase(saved.getMethod())
460
                || "PUT".equalsIgnoreCase(saved.getMethod())) {
450
            ByteChunk body = saved.getBody();
461
            ByteChunk body = saved.getBody();
451
            if (body != null) {
462
            if (body != null) {
Lines 511-517 Link Here
511
            saved.addLocale(locale);
522
            saved.addLocale(locale);
512
        }
523
        }
513
        if ("POST".equalsIgnoreCase(request.getMethod())) {
524
        if ("POST".equalsIgnoreCase(request.getMethod())
525
                || "PUT".equalsIgnoreCase(request.getMethod())) {
514
            // May need to acknowledge a 100-continue expectation
526
            // May need to acknowledge a 100-continue expectation
515
            request.getResponse().sendAcknowledgement();
527
            request.getResponse().sendAcknowledgement();

Return to bug 51940