Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

dancer, streaming, and Plack::Middleware::Deflater

by gsiems (Deacon)
on May 29, 2013 at 20:50 UTC ( [id://1035919]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1035919]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-03-29 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found