[web-devel] questions about ResponseEnumerator
Michael Snoyman
michael at snoyman.com
Wed Oct 5 08:56:41 CEST 2011
On Wed, Oct 5, 2011 at 8:47 AM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
> Hello,
>
> I have two questions about ResponseEnumerator.
>
> 1) If Application opens a file Handle and uses enumHandle to return
> ResponseEnumerator, how does the Application close the Handle?
The ResponseEnumerator itself is in charge of the entire process,
including running the Iteratee. So in pseudo-code, you'd do something
like:
ResponseEnumerator $ \mkiter -> do
handle <- getHandle
run_ $ enumHandler handle $ mkiter status headers
hClose handle
> 2) It seems to me that Warp pauses the timer while running
> Application. If we want to set timer to Application for security
> reasons, what is the best way to do so?
I think we could make that functionality optional, based on an extra
setting parameter. Would this just be boolean, or is more
sophisticated control required?
Michael
>
> Thanks.
>
> P.S.
>
> Background: a process of mighttpd sometime dies. I'm not sure but I
> suspect that the CGI part is doing something wrong.
>
> --Kazu
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
More information about the web-devel
mailing list