Skip to content

Commit 51f320d

Browse files
committed
Move comment about :aleph/ keys being internal to only cover the newly introduced ones
Might later be refined e.g. by namespacing them with :aleph.internal/ instead. See #700 for future reconsideration.
1 parent 28af6e3 commit 51f320d

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/aleph/http/core.clj

+4-4
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,14 @@
238238
:request-method (-> req .method .name str/lower-case keyword)
239239
:body body
240240
:scheme (if ssl? :https :http)
241-
:aleph/keep-alive? (HttpUtil/isKeepAlive req)
242241
:server-name (netty/channel-server-name ch)
243242
:server-port (netty/channel-server-port ch)
244243
:remote-addr (netty/channel-remote-address ch)
245244
:protocol "HTTP/1.1"
246-
;; These keys are internal to Aleph and should not be relied on
247-
:aleph/channel ch
248-
:aleph/request-arrived request-arrived)
245+
:aleph/keep-alive? (HttpUtil/isKeepAlive req)
246+
:aleph/request-arrived request-arrived
247+
;; The following keys are internal to Aleph and should not be relied on
248+
:aleph/channel ch)
249249

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

src/aleph/http/http2.clj

+5-4
Original file line numberDiff line numberDiff line change
@@ -822,12 +822,13 @@
822822

823823
:protocol "HTTP/2.0"
824824

825-
;; These keys are internal to Aleph and should not be relied on
825+
:aleph/keep-alive? true ; not applicable to HTTP/2, but here for compatibility
826+
:aleph/request-arrived (System/nanoTime)
827+
828+
;; The following keys are internal to Aleph and should not be relied on
826829
:aleph/channel ch
827830
:aleph/writable? writable?
828-
:aleph/h2-exception h2-exception
829-
:aleph/keep-alive? true ; not applicable to HTTP/2, but here for compatibility
830-
:aleph/request-arrived (System/nanoTime)}))
831+
:aleph/h2-exception h2-exception}))
831832

832833
(defn- validate-netty-req-headers
833834
"Netty is not currently checking for missing pseudo-headers, so we do it here."

0 commit comments

Comments
 (0)