title: compojure defroutes - route sometimes not recognized
body: <p>I have a clojure / compojure webapp with the following routes</p>
  
  <pre><code>(defroutes my-routes
   (GET "/app/preview" request  (my-preview-function request))
   (ANY "*" request (str "ANY page &lt;br&gt;" (request :params))))
  </code></pre>
  
  <p>The preview GET request is made with a couple of parameters. I find this works most of the time but sometimes the /ebook/preview is not found and processing drops to the ANY route, in which case the output is similar to this,</p>
  
  <pre><code>ANY page 
  {:* "/app/preview", :section "50", :id "48"}
  </code></pre>
  
  <p>Can anyone suggest what might cause the /ebook/preview request to be skipped? It is definitely a GET request being made; the HTML does not have a POST for the /app/preview URL and to be doubly sure I added a POST route for /app/preview and that was not being hit.</p>
  
  <p>JAR versions:</p>
  
  <pre><code>Clojure 1.2
  compojure-0.6.2
  ring-core-0.3.7
  jetty-6.1.14
  ring-jetty-adapter-0.3.1
  ring-servlet-0.3.1jar
  servlet-api-2.5-6.1.14
  </code></pre>
  
  <p>Routes are wrapped as follows</p>
  
  <pre><code>(require '[compojure.handler :as handler])
  
  (defn wrap-charset [handler charset]
    (fn [request]
      (if-let [response (handler request)]
        (if-let [content-type (get-in response [:headers "Content-Type"])]
          (if (.contains content-type "charset")
            response
            (assoc-in response
              [:headers "Content-Type"]
              (str content-type "; charset=" charset)))
          response))))
  
  (def app (-&gt; my-routes
             handler/site
             wrap-stateful-session
             (wrap-charset "utf-8")
             (wrap-file "public")))
  
  (defn run []
    (run-jetty (var app) {:join? false :port 8080}))
  </code></pre>