Skip to content

Allow PUT requests by default #69

Closed

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.

Activity

  1. gotoken commented on Aug 22, 2021

    @gotoken
    Member

    Looks good to me.

  2. hsbt commented on Apr 19, 2024

    @hsbt
    Member

    #70 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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