Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop Apache httpd from rejecting HTTP PATCH requests?

I'm working on an implementation of the JSON Patch spec using Java servlets on the Bitnami Tomcat Stack. On the servlet end I'm handling the HTTP PATCH method by overriding HttpServlet.service() method like so:

@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
    if (request.getMethod().equals("PATCH"))
        doPatch(request, response);
    else
        super.service(request, response);
}

The problem is that, when I try to send an HTTP PATCH request to Tomcat, Apache httpd rejects it with a 501 "Method Not Implemented".

Is there a way to make Apache httpd stop doing this?

like image 999
gilbertpilz Avatar asked Sep 08 '25 11:09

gilbertpilz


1 Answers

AJP13 does not yet support HTTP PATCH (AJPv13a). Connect your Apache Web Server and Tomcat using HTTP if you would like to use PATCH.

like image 200
brainfrozen Avatar answered Sep 10 '25 03:09

brainfrozen