Skip to content

Commit

Permalink
Use HeaderNames/create to support http/2 (#24)
Browse files Browse the repository at this point in the history
When handling an http/2 request hirundo requests will fail with a
PROTOCOL_ERROR if the response contains upper-case header names.

This fixes the issue by using HeaderNames/create which automatically
lower-cases the given header name.
  • Loading branch information
julienvincent authored Jul 27, 2024
1 parent b3f654b commit 0942aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/s_exp/hirundo/http/response.clj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
(.send server-response o))))

(defn header-name ^HeaderName [ring-header-name]
(HeaderNames/createFromLowercase (name ring-header-name)))
(HeaderNames/create (name ring-header-name)))

(defn set-headers!
[^ServerResponse server-response headers]
Expand Down

0 comments on commit 0942aed

Please sign in to comment.