Add test for invalid integer headers.#15
Conversation
|
Header values "must respond to |
|
@nateberkopec I think that's the implicit contract supported by all servers thus far, but I'm not certain middlewares are expecting that. I just updated Falcon (actually The actual spec is:
I think it's okay the spec remains strict. But the reality is, if servers assume the value is according to the spec, they will not be compatible with apps which don't follow this spec (which appears to be at least a non-zero number of apps). |
|
I was just thinking about this and was reminded that there was actually was a reported bug in Rack 3 / Rails / Puma, because Puma probably just implicitly just calls But no validation is done on |
Since Puma 6.0.0, it has been fixed: puma/puma@e2ef83b |
|
I ended up relaxing Falcon to handle this case. |
1353780 to
9be2b9e
Compare
When investigating socketry/protocol-rack#2 I found that
pumawill accept integer header values (and probably anything that has#to_s). This is a superset of the spec (non-string/non-array-of-string header values are rejected byRack::Lint), but it has caused users of less strict (e.g. basically every server according to this test) to create apps that are incompatible with servers that follow the spec more strictly.Possible outcomes:
to_swhere it makes sense.Being more strict will likely break people's applications. Therefore, my initial conclusion is to make
falcon/rack-protocolmore compatible... but if we decide a different outcome, I'll implement that.cc @MSP-Greg @nateberkopec @jeremyevans @tenderlove
Types of Changes
Contribution