Closed neural-wetware closed 7 years ago
Hey @neural-wetware, that is very unfortunate. Sorry for that :(
What we might do is having a (static?) flag or a constructor arg to throw/silent the exception, so that we would not modify the interface.
Question is: which behavior should be the default one?
I accepted the commit you linked as a fix, so we should keep this behavior as default IMO. Then we could have a "$strict" flag to throw exceptions. WDYT?
/ping @sgehrig
That's what I'd propose as well. Keep the current (fixed) behavior as default, and allow to switch to a more strict mode. Might be a bit tricky to inject that switch though.
I agree that the API should not be changed. Should we add a $strict = false
parameter to getBest()
?
Mmh this would slightly change the interface...
Something like this? #86
fixed.
2.2.0 has been released and contains the fix for this issue (cf. #86). Thanks everyone!
Please see #87
Commit 4e4802509d599d7be6cef919c5e79b3324cb34b4 silently skips invalid headers. I want this library to catch invalid headers so I can 406. It seems silly that I should have to parse the headers again to determine if they are invalid when the library is already doing this.
What do you think about reversing this change or adding a flag to
getBest()
to enable/disable this? I'm willing to implement this change.