httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John David Duncan <...@mysql.com>
Subject Re: Behaviour for Connection: close
Date Fri, 01 Feb 2008 17:11:43 GMT

Hi Ronald,

I can't answer your question.  But I wanted to mention: as I  
understand the standard, you should be returning a "202 Accepted"  
rather than a 200 in this case.

JD



On Feb 1, 2008, at 8:59 AM, Ronald Park wrote:

> I'm writing a module which is intended to do it's work
> 'asynchronously'.  My module takes the body of a POST,
> stores it into a note and immediately generates a response
> code of 200.  Then, during the logging stage, it does
> that actual work (in my case, writing stuff into a db).
>
> I have 'KeepAlives off' and, as expected, Apache sends
> back the 200 and 'Connection: close'... however, it does
> not "immediately" close the socket.  It proceeds to do
> logging and runs my code *then* closes the socket.
>
> The behavior is fine for some clients, those that see the
> 'Connection: close' and close their connections themselves.
> For them, my module is 'asynchronous'.  For others clients
> though, ones which wait for the server to close, it's not;
> their requests are practically synchronous (actually, a
> little slower).
>
> Is there a way to hook my module in absolutely after the
> close is called?  Is there a way to get the socket close
> to occur immediately after the response is sent?
>
> Or, am I going to have to do something like spawning off
> a thread, copying all the request data into that thread
> (so it doesn't go poof when the request pool is destroyed)
> and doing my work in that thread? :(
>
> Thanks,
> Ron
>


Mime
View raw message