Comment 2 for bug 532648

Revision history for this message
dirk (australiandeveloper) wrote :

It seems like this patch doesn't work. I think the problem is that the route is never returned if the request method is a HEAD request. It just continues on to the next line and throws a NotFound.

        // Not found - if the request was a HEAD, let's see if we can find a corresponding GET
        if (request.method.equals("HEAD")) {
            request.method = "GET";
            route(request);
            request.method = "HEAD";
            // *******************
            // There should be a return statement here
            // ******************
        }
        throw new NotFound(request.method, request.path);