pandeiro / boot-http

A simple HTTP serve task for the Boot build tool
62 stars 34 forks source link

fails to serve after clojure 1.8 warning #42

Closed nha closed 8 years ago

nha commented 8 years ago

This works (from inside the target directory):

cd target
boot -d pandeiro/boot-http serve -d . -p 5002 wait
2016-03-12 11:28:27.812:INFO::clojure-agent-send-off-pool-0: Logging initialized @3134ms
2016-03-12 11:28:27.841:INFO:oejs.Server:clojure-agent-send-off-pool-0: jetty-9.2.10.v20150310
2016-03-12 11:28:27.867:INFO:oejs.ServerConnector:clojure-agent-send-off-pool-0: Started ServerConnector@3eccafa2{HTTP/1.1}{0.0.0.0:5002}
2016-03-12 11:28:27.867:INFO:oejs.Server:clojure-agent-send-off-pool-0: Started @3189ms
Started Jetty on http://localhost:5002

Navigating to localhost:5002 shows the correct index.html page.

But this doesn't (from the root of the project - No data received ERR_EMPTY_RESPONSE):

boot -d pandeiro/boot-http serve -d target -p 5003 wait
Warning: version conflict detected: org.clojure/clojure version changes from 1.7.0 to 1.8.0
INFO  org.eclipse.jetty.util.log - Logging initialized @9667ms
INFO  org.eclipse.jetty.server.Server - jetty-9.3.0.RC0
INFO  o.e.jetty.server.ServerConnector - Started ServerConnector@e0393e1{HTTP/1.1}{0.0.0.0:5003}
INFO  org.eclipse.jetty.server.Server - Started @9742ms
Started Jetty on http://localhost:5003

So into the root of the project it seems to pickup some settings (from my boot file ?), there is a warning about clojure 1.8 used in my project. So there is something in my configuration that triggers a warning - and boot-http not to serve files. Note that the equivalent in my boot file fails as well (without warning) : (serve :port 5003, :dir "target")

What would be needed to start investigating ?

pandeiro commented 8 years ago

Thanks Nicolas for bringing this to my attention. I'm a bit perplexed, but I suppose a good first step for investigating would be a minimal reproduction case repo?

nha commented 8 years ago

It looks like it is not due to the Clojure version (I started making a small project to reproduces but it serves the directory listing correctly). I will have to dig a bit more to make a minimal reproduction case.

nha commented 8 years ago

Closing since I used boot-http in another project and it worked fine - will reopen if I manage to make a reliable minimal reproduction. Thanks !