From 43592f049ca6cabe968764673f0314b1325f6e80 Mon Sep 17 00:00:00 2001 From: Dom Kiva-Meyer Date: Thu, 2 Oct 2014 15:50:58 -0700 Subject: [PATCH 1/2] Update httpkit to 2.1.19 --- httpkit/project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpkit/project.clj b/httpkit/project.clj index d6da81d..3ea3aa0 100644 --- a/httpkit/project.clj +++ b/httpkit/project.clj @@ -4,4 +4,4 @@ :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :plugins [[lein-modules "0.3.9"]] - :dependencies [[http-kit "2.1.16"]]) + :dependencies [[http-kit "2.1.19"]]) From 562afcb34e1c4c81d6058983eb4285990b49ac87 Mon Sep 17 00:00:00 2001 From: Dom Kiva-Meyer Date: Thu, 2 Oct 2014 15:53:55 -0700 Subject: [PATCH 2/2] Update httpkit component config with server port HTTP Kit chooses an available port if the provided port is 0. These changes account for this feature by associating the chosen port into the component's config. --- httpkit/src/com/palletops/bakery/httpkit.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/httpkit/src/com/palletops/bakery/httpkit.clj b/httpkit/src/com/palletops/bakery/httpkit.clj index 34ee823..874b82f 100644 --- a/httpkit/src/com/palletops/bakery/httpkit.clj +++ b/httpkit/src/com/palletops/bakery/httpkit.clj @@ -22,7 +22,10 @@ (start [component] (if server component - (assoc component :server (start handler config)))) + (let [server (start handler config)] + (-> component + (assoc-in [:config :port] (-> server meta :local-port)) + (assoc :server server))))) Stoppable (stop [component] (if server