You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rian Hunter <ri...@MIT.EDU> on 2005/07/25 07:46:58 UTC

httpd 2.1 and ap_hook_create_request()

While working on mod_smtpd and verifying it works with current httpd  
I had a problem getting the ap_rgetline function to properly work  
without calling ap_run_create_request(). I figured the root of this  
problem was that core.c registers a net time filter that sets a  
default timeout on the socket in its create_request hook. It isn't an  
issue to call ap_run_create_request similar to how its done in  
http_core.c the only problem is that the create_request hook  
registered in http_core.c adds filters irrelevant to mod_smtpd  
(namely http_header_filter).

My temporary solution to this problem is to call  
apr_socket_timeout_set() on the socket in r->input_filters->ctx- 
 >client_socket manually without calling ap_run_create_request().  
This seems a little dirty to me, but I'm not completely sure.

Is a call to ap_run_create_request() relevant for a module like  
mod_smtpd, or is my temporary solution to ignore it correct enough?  
If calling ap_run_create_request should be necessary for a module  
like mod_smtpd, then other modules shouldn't register filters on the  
request_rec without checking if its the appropriate protocol/request.
-rian