Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow PUT requests by default #69

Closed
bharjr01 opened this issue May 6, 2021 · 2 comments
Closed

Allow PUT requests by default #69

bharjr01 opened this issue May 6, 2021 · 2 comments

Comments

@bharjr01
Copy link
Contributor

bharjr01 commented May 6, 2021

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.

@gotoken
Copy link
Member

gotoken commented Aug 22, 2021

Looks good to me.

@hsbt
Copy link
Member

hsbt commented Apr 19, 2024

#70 has been merged.

@hsbt hsbt closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants