Skip to content

Commit 3d0eab6

Browse files
committed
Add comment to caution users about :aleph/* keys in request maps
1 parent 273da7e commit 3d0eab6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/aleph/http/core.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,10 @@
242242
:server-name (netty/channel-server-name ch)
243243
:server-port (netty/channel-server-port ch)
244244
:remote-addr (netty/channel-remote-address ch)
245+
:protocol "HTTP/1.1"
246+
;; These keys are internal to Aleph and should not be relied on
245247
:aleph/channel ch
246-
:aleph/request-arrived request-arrived
247-
:protocol "HTTP/1.1")
248+
:aleph/request-arrived request-arrived)
248249

249250
(p/def-derived-map NettyResponse [^HttpResponse rsp destroy-conn? body]
250251
:status (-> rsp .status .code)

src/aleph/http/http2.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,7 @@
822822

823823
:protocol "HTTP/2.0"
824824

825+
;; These keys are internal to Aleph and should not be relied on
825826
:aleph/channel ch
826827
:aleph/writable? writable?
827828
:aleph/h2-exception h2-exception

0 commit comments

Comments
 (0)