@Phil I'm already using ring 1.2
$ lein deps :tree | grep ring
[compojure "1.1.5" :exclusions [[ring/ring-core]
[org.clojure/core.incubator] [clout]]]
[ring-basic-authentication "1.0.3"]
[ring-middleware-format "0.3.1" :exclusions [[org.clojure/tools.reader]]]
[ring "1.2.0"]
[ring/ring-core "1.2.0"]
[ring/ring-codec "1.0.0"]
[ring/ring-devel "1.2.0"]
[ring/ring-jetty-adapter "1.2.0"]
[ring/ring-servlet "1.2.0"]
[shoreleave/shoreleave-remote-ring "0.3.0" :exclusions
[[org.clojure/tools.reader]]]
@John
The home page is served through Compojure. There are quite a few handlers
involved:
(defroutes home-routes
(GET "/" []
(println "/ route handler")
(common/layout {:title (i18n/translate :home-page-title)
:nav nil
:content (home-content)})))
(defroutes app-routes
home-routes
; ...
(route/resources "/")
(route/not-found "Not found"))
(def application (-> #'app-routes
shoreleave/wrap-rpc
noir/wrap-request-map
handler/api
wrap-restful-params
wrap-multipart-params
(wrap-resource "public")
wrap-content-type
wrap-not-modified
wrap-noir-validation
wrap-noir-cookies
wrap-noir-flash
(wrap-noir-session {:store (memory-store mem)})
(wrap-if development? wrap-reload {:dirs ["src"]})))
Here's the result of comparing the uberjar trees...
$ jar tf myapp-by-lein-2.3.2.jar > myapp-by-lein-2.3.2.tree
$ jar tf myapp-by-lein-2.3.3.jar > myapp-by-lein-2.3.3.tree
$ diff myapp-by-lein-2.3.2.tree myapp-by-lein-2.3.3.tree
6a7
> cheshire/
19a21
> cheshire/custom/
56a59
> cheshire/generate/
113a117,118
> clj_time/
> clj_time/coerce/
...
What I see is that in the tree generated by Leiningen 2.3.3 there are more
entries because there are paths that have their own entries, while in the
tree for 2.3.2 there are only entries for the filenames within those paths.
This is the case of cheshire/ for example, however there are also paths
that have their own entries in both trees (ex. clojure/core/ ).
I don't understand those differences.
Does that help to diagnose the problem? I still don't have a clue :(
Xavi
On Saturday, October 19, 2013 1:27:43 AM UTC+2, Phil Hagelberg wrote:
>
> I think this is due to a bug in older versions of Ring's wrap-resource
> middleware:
>
>
> https://github.com/ring-clojure/ring/commit/89033af49dfe3d6e6fcdebb3f5455f6de0979034
>
> In versions of Ring older than 1.2.0, directory entries will be served out
> of jar files as zero-length HTTP responses. Upgrading to the latest version
> of Ring will fix the problem.
>
> -Phil
>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.