From 8212641d76ed3c29aac1afc7bcedbcf27e33f9ec Mon Sep 17 00:00:00 2001 From: Julien Vincent Date: Thu, 25 Jul 2024 14:54:49 +0100 Subject: [PATCH] Add :authority to request object On http/2 the request header "host" is not available - instead it is intended that the authority property is used. Halidon does populate the authority field in both http/1.1 and http/2 so it's a stable field that can be references accross both. --- src/s_exp/hirundo/http/request.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/s_exp/hirundo/http/request.clj b/src/s_exp/hirundo/http/request.clj index 0a61b4a..530b6d9 100644 --- a/src/s_exp/hirundo/http/request.clj +++ b/src/s_exp/hirundo/http/request.clj @@ -63,6 +63,7 @@ :protocol (ring-protocol (.prologue server-request)) :request-method (ring-method (.prologue server-request)) :headers (ring-headers (.headers server-request)) + :authority (.authority server-request) ::server-request server-request ::server-response server-response})