Created
August 13, 2012 12:20
-
-
Save alexott/3340127 to your computer and use it in GitHub Desktop.
Example to reproduce thread leak in ring-core (when parsing multipart uploads)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns rtest.core | |
(:gen-class) | |
(:use [ring.middleware params multipart-params keyword-params] | |
ring.adapter.jetty | |
) | |
) | |
(defn handler [request] | |
{:status 200 | |
:headers {"Content-Type" "text/plain"} | |
:body (str "File upload: " | |
(:multipart-params request)) | |
}) | |
(def app | |
(-> handler | |
wrap-params | |
wrap-keyword-params | |
wrap-multipart-params)) | |
(defn -main [& args] | |
(run-jetty app {:port 3000})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment