[web-devel] Content-Length on sendFile

Nubis nubis at woobiz.com.ar
Tue Jun 14 19:16:57 CEST 2011


Hi guys,
Just wanted to give you a heads up that yesod's sendFile is not setting the
Content-Length header, which 'breaks' some proxies and load balancers. (in
our case, amazon elastic load balancer).
I don't know if that's by design, I'm not 100% sure but not setting the
header would be only useful for 'long pooling' of binary files for doing
some sort of hackish http streaming, which I don't think is yesod's purpose
anyways :)
A workaround is setting the Content-Length header before calling sendFile, I
guess it may be something easy to add, I was going to propose a patch that
just wraps the current implementation in a do block that sets the header,
but then I noticed a number of optimizations being made that hint there
should be a 'better' way.

cheers!
----nubis :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110615/71b3334b/attachment-0001.htm>


More information about the web-devel mailing list