-
Notifications
You must be signed in to change notification settings - Fork 292
CA-406403: Do not return HTTP 500 when Accept header can't be parsed #6298
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was checking whether an existing library could do this, all I could find was:
https://ocaml.org/p/httpaf_caged/latest/doc/Httpaf_caged/Accept/index.html
https://ocaml.org/p/dream-accept/latest
But they each depend on their own http libraries (httpaf and dream-message), and not the common http
library.
5453d23
to
277c79a
Compare
Just a question, why didn't we use one of these http libraries, is it because there was no available library then? Thank you! |
before 2012 OCaml didn't have a common repository of libraries (opam). So some may have existed, but the normal way of working was for everybody to build its own stack of libraries. |
277c79a
to
edcffb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I this implementing the spec or deals with the cases we support? The spec has a lot of details that would require a parser.
Signed-off-by: Pau Ruiz Safont <[email protected]>
90d42da
to
1b49eba
Compare
The changes in the parser have brought a lot of uneeded attention, as the parsing wasn't being changed, only how the errors were transmitted. I've changed the PR to only document the existing parser and change how it's handled by the /update_rrds HTTP endpoint |
1b49eba
to
a73fe46
Compare
/update_rrds returned a 500 HTTP code in some cases where the accept header was invalid. Now these cases are treated in the same way as a lack of Accept header. Signed-off-by: Pau Ruiz Safont <[email protected]>
a73fe46
to
7e64a26
Compare
Without the patch:
with the patch:
|
/update_rrds returned a 500 HTTP code in some cases where the accept header was
invalid. Now these cases are treated in the same way as a lack of Accept
header.