javaee / grizzly

Writing scalable server applications in the Java™ programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO framework has been designed to help developers to take advantage of the Java™ NIO API.
https://javaee.github.io/grizzly/
Other
222 stars 60 forks source link

Allow disabling header name lower case transformation #1832

Closed glassfishrobot closed 8 years ago

glassfishrobot commented 8 years ago

Because of the current parser implementation found in org.glassfish.grizzly.http.HttpCodecFilter#parseHeaderName header names are changed to be lower case. While this is helpful in most scenarios, it makes the proxying one difficult since the received headers can't be sent to another service exactly as received. It would be great to provide a system property to avoid the transformation.

glassfishrobot commented 8 years ago

Reported by afelisatti

glassfishrobot commented 8 years ago

afelisatti said: Hi, @oleksiys. Any update on this?

glassfishrobot commented 8 years ago

@rlubke said: Hello, we hope to get to this issue this week.

glassfishrobot commented 8 years ago

@rlubke said: Changes applied to the 2.3 branch. Could you please try setting

-Dorg.glassfish.grizzly.http.PRESERVE_HEADER_CASE=true

with tonight's nightly build and confirm?

Thanks!

glassfishrobot commented 8 years ago

afelisatti said: Hi, @rlubke. It seems the equivalent fix is missing in

protected static boolean parseHeaderName(final HttpHeader httpHeader,
            final MimeHeaders mimeHeaders, final HeaderParsingState parsingState,
            final byte[] input, final int end)

That version seems to be used when decoding through org.glassfish.grizzly.http.HttpCodecFilter#decodeHttpPacketFromBytes instead of the buffer counterpart.

glassfishrobot commented 8 years ago

@rlubke said: You're right, sorry! I've pushed the changes and they should be available in tonight's nightly.

glassfishrobot commented 8 years ago

afelisatti said: Thanks @rlubke, I've just verified the fix. Is there an estimate release date for Grizzly 2.3.25?

glassfishrobot commented 8 years ago

@rlubke said: I'll try to get to it today. If not, early next week for sure. Will that work?

glassfishrobot commented 8 years ago

afelisatti said: Yes, That will be great. We are hoping to make time for the upgrade next Friday at the earliest. Thanks!

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA GRIZZLY-1832

glassfishrobot commented 8 years ago

Marked as fixed on Friday, May 20th 2016, 4:07:17 pm