File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
ring-servlet/src/ring/util Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 88 HttpServletRequest
99 HttpServletResponse]))
1010
11- (defn- get-headers
12- " Creates a name/value map of all the request headers."
13- [^HttpServletRequest request]
11+ (defn- get-headers [^HttpServletRequest request]
1412 (reduce
1513 (fn [headers, ^String name]
1614 (assoc headers
2119 {}
2220 (enumeration-seq (.getHeaderNames request))))
2321
24- (defn- get-content-length
25- " Returns the content length, or nil if there is no content."
26- [^HttpServletRequest request]
22+ (defn- get-content-length [^HttpServletRequest request]
2723 (let [length (.getContentLength request)]
2824 (when (>= length 0 ) length)))
2925
30- (defn- get-client-cert
31- " Returns the SSL client certificate of the request, if one exists."
32- [^HttpServletRequest request]
26+ (defn- get-client-cert [^HttpServletRequest request]
3327 (first (.getAttribute request " javax.servlet.request.X509Certificate" )))
3428
3529(defn build-request-map
6458 :servlet-context (.getServletContext servlet)
6559 :servlet-context-path (.getContextPath request)}))
6660
67- (defn- set-headers
68- " Update a HttpServletResponse with a map of headers."
69- [^HttpServletResponse response, headers]
61+ (defn- set-headers [^HttpServletResponse response, headers]
7062 (doseq [[key val-or-vals] headers]
7163 (if (string? val-or-vals)
7264 (.setHeader response key val-or-vals)
You can’t perform that action at this time.
0 commit comments