ocaml-cohttp icon indicating copy to clipboard operation
ocaml-cohttp copied to clipboard

Added check to parser header till trailing \r\n

Open Athishpranav2003 opened this issue 1 year ago • 3 comments

This PR addresses #1032 . Here we basically raise Exception whenever we find a incorrect section while parsing headers.

Athishpranav2003 avatar Aug 09 '24 05:08 Athishpranav2003

@rgrinberg can you please check this

Athishpranav2003 avatar Aug 09 '24 05:08 Athishpranav2003

Why do we need a separate exception for invalid headers? Why can't we just raise whatever we raise when we fail to parse the request for any other reason? E.g. Content-Length isn't a valid number for example.

rgrinberg avatar Aug 30 '24 15:08 rgrinberg

@rgrinberg i cannot find the exception we raise for such issues. Could you please show which exception are you referring to

Athishpranav2003 avatar Aug 30 '24 16:08 Athishpranav2003