gsiems has asked for the wisdom of the Perl Monks concerning the following question:

Greetings

I'm still having way too much fun using dancer to get (mostly ReSTful) things done, having implemented the suggested solutions from Streaming data using dancer and Dancer as a proxy in order to stream both database queries and (soon) proxied files.

However, I've run into another streaming issue-- namely that streaming doesn't seem to work when I have Plack::Middleware::Deflater enabled in my dancer config. With Deflater enabled, the streamed routes fail when retrieved using a web browser, yet they still work when using wget (go figure). My suspicion is that wget isn't using/doesn't support "Accept-Encoding gzip, deflate" whereas the browser does.

FWIW, I'm using the configuration suggestion as per the fine documention:

plack_middlewares: - - Plack::Middleware::Deflater

At any rate, todays question is: "Does anyone know how to get streaming in dancer working with compression?", or optionally "How does one selectively, on a per route basis, disable compression when using Deflater?".

Many thanks

Replies are listed 'Best First'.
Re: dancer, streaming, and Plack::Middleware::Deflater
by Anonymous Monk on May 30, 2013 at 02:54 UTC