unfiltered-netty: loading resources from jar

27 views
Skip to first unread message

Crazy Frog

unread,
Oct 29, 2015, 3:09:57 AM10/29/15
to Unfiltered

I'm running 0.8.1, can NOT load jar resources using the method used inhttps://github.com/n8han/pamflet/blob/master/library/src/main/scala/shared.scala 
to load resources from jar:

unfiltered.netty.Server.bind(binding)
      .chunked(5242880) // allow max 5MB uploads
      .resources(new java.net.URL(getClass.getResource("/public/marker"), "."))
      .plan(SomePlan)

curl 'http://localhost:port/blah.css' returns:

< HTTP/1.1 200 OK
< Content-Length: 527
< Content-Type: text/css
< Date: Thu, 29 Oct 2015 07:02:33 GMT
< Cache-Control: private, max-age=60
< Last-Modified: Tue, 17 Sep 2013 10:16:34 GMT
< Connection: keep-alive
< Expires: Thu, 29 Oct 2015 07:03:33 GMT

but the data is never received, the connection just hangs there without finishing


I left a comment here: https://github.com/unfiltered/unfiltered/issues/131


thinking that this might be a regression? apologies for cross posting...



Crazy Frog

unread,
Oct 29, 2015, 4:12:24 AM10/29/15
to Unfiltered
Note I'm using
unfiltered.netty.async.Plan

Crazy Frog

unread,
Oct 29, 2015, 4:42:25 AM10/29/15
to Unfiltered
Sorry, something i forgot to mention:

running the app using sbt (run) works, however, when its packaged up using native-packager (universal::packageBin) and run from bin/script, the resources do not get transferred at all...


On Thursday, 29 October 2015 17:09:57 UTC+10, Crazy Frog wrote:

Timothy Perrett

unread,
Dec 4, 2015, 2:55:03 AM12/4/15
to Unfiltered
There was a bug. Upgrade to 0.8.4. I got hit by this same issue. Here's an example of it working for real: 
Reply all
Reply to author
Forward
0 new messages