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
Require the response headers be an unfrozen hash in SPEC #1597
Conversation
I'm happy with this as a starting point for #1592 |
@bryanmacfarlane sorry to ping you directly.... but I just don't understand why this is going wrong. We have a workflow set up for push and pull_request, and now we seem to get 2x the jobs executing, i.e. for both push and pull_request. What are we doing wrong here? Thanks and sorry to bother you. |
These changes ensure that if middleware uses e.g.
|
If you only state that "headers must be a hash", then adding another value to the hash when there's already a value there is... fraught with peril. If "headers must be a hash" is where SPEC goes, I'd suggest going a bit further and saying "headers must be a |
There's a lot going on in that linked issue, and you're right that there's some opinion against the proposal you made there. However, it's discussing a slightly different point to what we're talking about in this issue. Over in #1597, you're proposing that arrays be allowed header values, but not requiring them, within the context of not otherwise changing the format of This issue, though, is about mandating a more restrictive interface for Yes, everyone could just use |
4676aca
to
b59eaaf
Compare
This is stricter than what was previously required. However, non-hash response headers would break most of the middleware that accesses response headers. Middleware in many cases adds or removes headers, so require the hash not be frozen, so that this can be done efficiently. Fixes #1222
b59eaaf
to
5d339ee
Compare
I've reverted this back to the original commit which was co-authored by @jeremyevans and I believe we agree on, so I'll push forward with this in the first instance. |
This is stricter than what was previously required. However,
non-hash response headers would break most of the middleware
that accesses response headers.
Middleware in many cases adds or removes headers, so require
the hash not be frozen, so that this can be done efficiently.
Fixes #1222