grizzly icon indicating copy to clipboard operation
grizzly copied to clipboard

Issue #2212 Enhances validation of HTTP header names

Open carryel opened this issue 5 months ago • 0 comments

This is a PR for Issue #2212.

The patch contains two contents.

  1. 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.
  2. 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.

carryel avatar Sep 14 '24 14:09 carryel