Permalink
Browse files
Fix bug in httpcore adapter, increase consistency of adapter docs.
- Loading branch information...
Showing
with
8 additions
and
6 deletions.
-
+5
−5
src/ring/adapter/httpcore.clj
-
+3
−1
src/ring/adapter/jetty.clj
|
|
@@ -1,5 +1,5 @@ |
|
|
(ns ring.adapter.httpcore
|
|
|
- (:import (org.apache.http HttpRequest Header HttpEntityHttpEntityEnclosingRequest HttpResponse
|
|
|
+ (:import (org.apache.http HttpRequest Header HttpEntityEnclosingRequest HttpResponse
|
|
|
ConnectionClosedException HttpException HttpServerConnection)
|
|
|
(org.apache.http.entity AbstractHttpEntity StringEntity EntityTemplate InputStreamEntity
|
|
|
FileEntity ContentProducer)
|
|
|
@@ -149,10 +149,10 @@ |
|
|
(defn run-httpcore
|
|
|
"Serve the given app according to the options.
|
|
|
Options:
|
|
|
- :port, an Integer.
|
|
|
- :server-name, a String (for old HTTP/1.0 clients).
|
|
|
- :server-port, an Integer (for old HTTP/1.0 clients, when public facing port is different from :port).
|
|
|
- :execute, a function with signature [f & args] that applies f to args, usually in another thread."
|
|
|
+ :port (Optional, Integer)
|
|
|
+ :server-name (Optional, String) for old HTTP/1.0 clients
|
|
|
+ :server-port (Optional, Integer) for old HTTP/1.0 clients, when public facing port is different from :port
|
|
|
+ :execute, (Optional, IFn) function with signature [f & args] that applies f to args, usually in another thread"
|
|
|
[app {:keys [port server-name server-port execute]}]
|
|
|
(let [execute (or execute (partial executor-execute
|
|
|
(Executors/newCachedThreadPool
|
|
|
|
|
|
@@ -46,7 +46,9 @@ |
|
|
(defn run-jetty
|
|
|
"Serve the given handler according to the options.
|
|
|
Options:
|
|
|
- :port, an Integer."
|
|
|
+ :port (Optional, Integer)
|
|
|
+ :host (Optional, String)
|
|
|
+ :ssl-port, :keystore, :key-password, :truststore, :trust-password"
|
|
|
[handler options]
|
|
|
(doto (create-server options)
|
|
|
(.setHandler (proxy-handler handler))
|
|
|
|
0 comments on commit
03c894a