No, the only state maintained in the request is the socket and what's
read from the socket.
> I can call the handler with several parameters but it won't be
> modular:
> handler(Req, Session...)
It could be perfectly modular if instead of Session you passed around
a proplist that your session middleware would modify, or an ets table
or something like that. I would recommend against using the process
dictionary because the process doesn't die at the end of a request so
you have to somehow make sure to clean it up.
> I really like the way mochiweb uses parametrized modules to put all
> data in the Req.
> Will you consider adding a general get/set functions for custom
> request data?
It doesn't fit the functional style and it adds overhead for something
we wouldn't use, so I wouldn't add this kind of functionality to
mochiweb_request.
-bob
HTTP Keep-Alive.
>>
>> > I really like the way mochiweb uses parametrized modules to put all
>> > data in the Req.
>> > Will you consider adding a general get/set functions for custom
>> > request data?
>>
>> It doesn't fit the functional style and it adds overhead for something
>> we wouldn't use, so I wouldn't add this kind of functionality to
>> mochiweb_request.
>
> I'm looking at ewgi and beepbeep.
> Do you think there is an advantage of using ewgi except for server
> portability?
> It introduces middleware chaining and iterator to mochiweb which let
> you handle session and url rewriting for example.
> Yet, I feel that it duplicates part of mochiweb code.
I don't have any opinion on that stuff, we only use mochiweb as-is.
-bob