Re: tomcat 6/7 stream closed error in ring json - works in lein ring server

2014-09-03 Thread Colin Yates
(is this is the longest delay in replying ever? :)) You are right - I mistakenly thought that json-wrap-params only exposed the request params as oppose to exposing the JSONified body in the params; I thought json-wrap-body and json-wrap-params were complimentary. Now I have read the docs (http

Re: tomcat 6/7 stream closed error in ring json - works in lein ring server

2013-11-03 Thread James Reeves
It would. I'm not sure why one fails and the other does not, unless the request object passed through Tomcat is different somehow, or unless you accidentally sent two different HTTP requests when testing. Regardless, the error message you've received is pretty clear - the JSON stream is consumed b

Re: tomcat 6/7 stream closed error in ring json - works in lein ring server

2013-11-03 Thread Colin Yates
Hi James, Not sure why I did that double wrapping.. However, wouldn't that also fail in Jetty? On 4 November 2013 01:02, James Reeves wrote: > Hi Colin, > > One of the compromises Ring makes for efficiency is that the body of a > request is an InputStream, rather than a static string or byte

Re: tomcat 6/7 stream closed error in ring json - works in lein ring server

2013-11-03 Thread James Reeves
Hi Colin, One of the compromises Ring makes for efficiency is that the body of a request is an InputStream, rather than a static string or byte array pre-loaded into memory. Because it's a stream, it can potentially be consumed by previous middleware. For some reason you have both wrap-json-body

Re: tomcat 6/7 stream closed error in ring json - works in lein ring server

2013-11-03 Thread Colin Yates
Apologies - I just realised a Compojure group existed. I have posted in there (https://groups.google.com/forum/#!topic/compojure/_jut36dXmCM) as well. On Monday, 4 November 2013 00:20:29 UTC, Colin Yates wrote: > > Hi all, > > I have developed a ring/compojure app which receives and servers JSO

tomcat 6/7 stream closed error in ring json - works in lein ring server

2013-11-03 Thread Colin Yates
Hi all, I have developed a ring/compojure app which receives and servers JSON. All is well in 'lein ring server' but as soon as I do 'lein ring uberwar' and deploy it to tomcat 6 or 7 it fails. To be explicit, the app deploys and I can view the static resources, but as soon as I issue a JSON