[web-devel] Content-Length on sendFile

Greg Weber greg at gregweber.info
Wed Jun 15 04:17:17 CEST 2011

Hi Kazu,

I apologize for the confusing terminology. I am not differentiating between
sending a static file with sendfile and a streaming response. I
am differentiating between 2 different use cases for sending static files
(with sendfile). For all of my web applications, I know what all the static
files are and they will never change until I deploy another web application.
That means I can stat the files once when the application is deployed and
keep that information in memory. So I already have the file length
information to include in the header, even though I don't do a file stat
when the file is requested. wai-app-static and yesod-static supports these

I hope that is clearer.


> Yes, I know. The former uses ResponseFile and the latter typically
> uses ResponseBuilder/ResponseEnumerator. I discussed in the context of
> ResponseFile which uses sendfile.
> Sorry but I don't understand what you try to explain here.
> --Kazu
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110614/3756ef8e/attachment.htm>

More information about the web-devel mailing list