grizzly
grizzly copied to clipboard
Issue #2212 Enhances validation of HTTP header names
This is a PR for Issue #2212.
The patch contains two contents.
- If the HTTP header name contains
\r\n
and it is an incomplete packet, ignore it and proceed with parsing. At this time, I was wondering whether to allow not only\r\n
but also single\n
, so for now, I decided to allow only\r\n
. - Since there is an existing validation utility that validates cookie headers(https://github.com/eclipse-ee4j/grizzly/blob/master/modules/http/src/main/java/org/glassfish/grizzly/http/util/CookieHeaderParser.java), I tried using the existing validation instead of creating a new one.
Overall, I patched it so that there would be no major changes while maintaining the existing logic, and added related test cases.