[Dancer-users] send_file Content-Disposition

Matthew Vickers mvickers at quispiam.com
Tue Feb 8 01:43:40 CET 2011











I like this idea, mostly because it makes it easier to remember and is more logical. Send Headers, Send File. 

But Richard's idea with some parameters being optional for backward compatability is also good. 


> I'm not sure about the implementation of send_file() - I haven't checked it myself - but shouldn't it set the correct headers? 
> What is the nature of the headers you're explicitly declaring? 

> I should probably do some more reading instead of asking you, but it's 2am and I'm tired. :) 

Hi sawyer, 

I in no way understand the magic behind the curtain that is Dancer but it seems to me like the response from send_file is not the same as the 
response from the route handler. Setting the header explicitly seems not to work. I have created a gist that may give other people an idea of 
what headers are created and sent. There are two routes defined and in comments the output of curl --head. 

https://gist.github.com/815588 

As you can see the headers are different for the /attachment route than what they are for the / route. 

Get some rest anyway mate this is in no way a show stopper for me. 

Matt. 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110208/a95d2de2/attachment.htm>


More information about the Dancer-users mailing list