CARVIEW |
Every repository with this icon (

Every repository with this icon (

Description: | Concise web framework for Clojure edit |
Loading…
-
featurexmediumx
In Clojure, the
=
function checks the equality of strings lazily. This is good for efficiency, but bad for cryptographic security, as it gives an attacker potentially useful information.A
strict-seq=
function is needed in thecompojure.crypto
namespace. Whilst=
returns false the moment it finds an item in the sequence that does not match, thestrict-seq
function will always check every value in a sequence.Comments
-
easyxfeaturex
Currently in Compojure you attach a handler to a server like:
(use 'compojure.server.jetty) (run-server {:port 8080} "/*" (servlet your-handler))
This allows integration with other Java servlets, which is sometimes quite useful. However, most of the time, people won't need this functionality. The Ring spec defines adapters which provide a more concise way of attaching a handler to a web server. In Compojure's case, we could create a
jetty
andgrizzly
adapter.(use 'compojure.adapter) (jetty {:port 8080} your-handler)
The options map should be optional, in the same way it is for
run-server
. The above code can just be a convenient wrapper around the normal Compojure servers.Comments