Comments (5)
Is this still valid? And do we have the patch?
Here's what the spec says:
10.4.6 405 Method Not Allowed
The method specified in the Request-Line is not allowed for the
resource identified by the Request-URI. The response MUST include an
Allow header containing a list of valid methods for the requested
resource.
So we'd need to have a "not_found" chunk of code that runs when no route matches, that tries the lookup for all other kinds of HTTP methods, keeping track of which ones do in fact match. Build the Accepts header, and then send that back down the pipe as a 405.
from sinatra.
There is an experimental patch in rkh/bad_method, but it comes at performance/memory cost.
from sinatra.
Was this every patched? It still seems to be an issue.
from sinatra.
No, it was never patched. We might tackle this in 2.0.
from sinatra.
@rkh was this ever fixed?
from sinatra.
Related Issues (20)
- Spam issue, ignore
- Sinatra::IndifferentHash does not support initialization with any hash or key-value pair list HOT 9
- Remove the `IndifferentHash` initializer HOT 3
- Release 3.2.0
- Remove references to the `sysrandom` gem from the README
- rackup command fails with Sinatra app in ruby 3.3.0-rc1
- Classic Style Application without a `config.ru` does not work with Ruby 3.3 and Bundler 2.5 HOT 9
- Address warnings seen when running rack-protection tests
- Release 4.0
- Failing tests with ruby-head HOT 7
- rack-protection: addition of "base64" as a dependency conflicts with passenger HOT 7
- Raise `required_ruby_version` to 2.7.8
- Route Middleware
- 4.0.0 Params Empty/Missing? HOT 2
- With Sinatra 4/Rack3, now requires "request.body.rewind"
- Upgrading to 4.0.0 required me to do a new request.body.rewind before a request.body.read HOT 2
- I made a template for Sinatra if you guys wanna include it in examples
- paradise lost, also, stability (GETTING STARTED does NOT) HOT 4
- Segmentation Fault with 4.0.0 HOT 5
- sinatra-contrib tests fails on truffleruby 24.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sinatra.