Skip to content

Commit

Permalink
Move comment about :aleph/ keys being internal to only cover the newl…
Browse files Browse the repository at this point in the history
…y introduced ones

Might later be refined e.g. by namespacing them with :aleph.internal/ instead. See
#700 for future reconsideration.
  • Loading branch information
DerGuteMoritz committed Nov 23, 2023
1 parent ec36caf commit 0674f4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/aleph/http/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@
:request-method (-> req .method .name str/lower-case keyword)
:body body
:scheme (if ssl? :https :http)
:aleph/keep-alive? (HttpUtil/isKeepAlive req)
:server-name (netty/channel-server-name ch)
:server-port (netty/channel-server-port ch)
:remote-addr (netty/channel-remote-address ch)
:protocol "HTTP/1.1"
;; These keys are internal to Aleph and should not be relied on
:aleph/channel ch
:aleph/request-arrived request-arrived)
:aleph/keep-alive? (HttpUtil/isKeepAlive req)
:aleph/request-arrived request-arrived
;; The following keys are internal to Aleph and should not be relied on
:aleph/channel ch)

(p/def-derived-map NettyResponse [^HttpResponse rsp destroy-conn? body]
:status (-> rsp .status .code)
Expand Down
9 changes: 5 additions & 4 deletions src/aleph/http/http2.clj
Original file line number Diff line number Diff line change
Expand Up @@ -822,12 +822,13 @@

:protocol "HTTP/2.0"

;; These keys are internal to Aleph and should not be relied on
:aleph/keep-alive? true ; not applicable to HTTP/2, but here for compatibility
:aleph/request-arrived (System/nanoTime)

;; The following keys are internal to Aleph and should not be relied on
:aleph/channel ch
:aleph/writable? writable?
:aleph/h2-exception h2-exception
:aleph/keep-alive? true ; not applicable to HTTP/2, but here for compatibility
:aleph/request-arrived (System/nanoTime)}))
:aleph/h2-exception h2-exception}))

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

0 comments on commit 0674f4f

Please sign in to comment.