-
Notifications
You must be signed in to change notification settings - Fork 62
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
BC break? - Fix for issue #81 - silently skip invalid header values coming in from clients #84
Conversation
instead of throwing exceptions on invalid headers from clients, the new code silently skips these header values and continues to parse the header for a best match
Great! |
Wondering if this is a BC break to be honest. The "BC break" is actually the bug itself, hence it is a bugfix IMO.. I know the behavior of the lib will change because it will not throw an exception anymore, but that behavior was faulty. |
You're right. I think it's easy to argue that it's not a BC break because, as you said, the original implementation had some flaws. |
https://twitter.com/phpalcohol/status/770562475951550464:
I think this is a good argument. |
thanks @sgehrig! |
@sgehrig you should rebase your branch so that the commit diff contains only the relevant changes instead of adding changes from other commits in your patch. Anyway, I think this one qualifies as a bug fix (rejecting the whole negotiation when the client submits an invalid header value among others does not loo like something to be considered as a feature) |
This is indeed a BC break: https://travis-ci.org/api-platform/core/jobs/156291020 |
@dunglas do you agree that the behavior was incorrect? |
Yes, this change will allow me to remove some useless code. |
silently skip invalid header values coming in from a client
instead of throwing exceptions on invalid headers from clients, the new code silently skips these header values and continues to parse the header for a best match