Skip to content

Allow PUT requests by default #69

@bharjr01

Description

@bharjr01

Webrick currently responds to PUT requests with a status code 405 Method Not Allowed. The ProcHandler class needs to be patched to handle PUT requests correctly, which incurs duplication across projects:

module WEBrick
  module HTTPServlet
    class ProcHandler
      alias do_PUT do_POST
    end
  end
end

Given that POST requests are allowed by default, and both PUT and POST requests are appropriately parsed in httprequest.rb, it seems reasonable to also allow PUT requests by default.

Others have encountered this sort of issue 1 2 suggesting that the behaviour is unexpected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions