Diff for /parser3/src/targets/apache/mod_parser3.c between versions 1.2 and 1.4

version 1.2, 2010/11/13 00:44:08 version 1.4, 2010/11/14 22:49:57
Line 21  static const char * const IDENT_MOD_PARS Line 21  static const char * const IDENT_MOD_PARS
   
 #include "pa_httpd.h"  #include "pa_httpd.h"
   
   #define PARSER3_HANDLER "parser3-handler"
   
 /*  /*
 * To Ease Compatibility  * To Ease Compatibility
 */  */
Line 87  static const char* cmd_parser_status_all Line 89  static const char* cmd_parser_status_all
 * Now let's declare routines for each of the callback phase in order.  * Now let's declare routines for each of the callback phase in order.
 */  */
   
 static int parser_handler(request_rec *ar) {  static int parser_handler(request_rec *r) {
         // record clone  
         pa_request_rec lr={  //      ap_log_rerror(APLOG_MARK, APLOG_EMERG, 0, r, "handler, r->handler=%s", r->handler);
                 ar,  
                 ar->pool,  #ifdef STANDARD20_MODULE_STUFF
                 ar->header_only,          if(strcmp(r->handler, PARSER3_HANDLER))
                 &ar->status,                  return DECLINED;
                 ar->method,  #endif
                 ar->headers_out,          // converting to parser version
                 ar->subprocess_env,          pa_request_rec pr={
                 &ar->content_type,                  r,
                 ar->uri,                  r->pool,
                 ar->filename,                  r->header_only,
                 ar->path_info,                  &r->status,
                 ar->args,                  r->method,
                 &ar->finfo                  r->headers_out,
                   r->subprocess_env,
                   &r->content_type,
                   r->uri,
                   r->filename,
                   r->path_info,
                   r->args,
   #ifdef STANDARD20_MODULE_STUFF
                   r->finfo.filetype == 0
   #else           
                   r->finfo.st_mode == 0
   #endif
         };          };
   
         // config          // config
         Parser_module_config *dcfg=our_dconfig(ar);          Parser_module_config *dcfg=our_dconfig(r);
           
         return pa_parser_handler(&lr, dcfg);          return pa_parser_handler(&pr, dcfg);
 }  }
   
 /*   /* 
 * This function is called during server initialisation.  * This function is called during process initialisation.
 */  */
   
   #ifdef STANDARD20_MODULE_STUFF
   static void parser_module_init(apr_pool_t *p, server_rec *s) {
   #else
 static void parser_module_init(server_rec *s, apr_pool_t *p) {  static void parser_module_init(server_rec *s, apr_pool_t *p) {
 #if MODULE_MAGIC_NUMBER >= 19980527  
         ap_add_version_component(p, pa_version());          ap_add_version_component(p, pa_version());
 #endif    #endif  
                   ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, "parser inited %d", getpid());
         /*  
         * Set up any module cells that ought to be initialised.  
         */  
         pa_setup_module_cells();          pa_setup_module_cells();
 }  }
   
Line 269  static const command_rec parser_cmds[] = Line 281  static const command_rec parser_cmds[] =
 #ifndef STANDARD20_MODULE_STUFF  #ifndef STANDARD20_MODULE_STUFF
 static const handler_rec parser_handlers[] =  static const handler_rec parser_handlers[] =
 {  {
         {"parser3-handler", parser_handler},          {PARSER3_HANDLER, parser_handler},
         {NULL}          {NULL}
 };  };
 #endif  #endif
Line 286  static const handler_rec parser_handlers Line 298  static const handler_rec parser_handlers
 */  */
 static void parser_register_hooks(apr_pool_t* pool)  static void parser_register_hooks(apr_pool_t* pool)
 {  {
         ap_add_version_component(pool, pa_version());  //      ap_add_version_component(pool, pa_version());
 //      ap_hook_post_config(parser_server_init, NULL, NULL, APR_HOOK_MIDDLE);  //      ap_hook_post_config(parser_server_init, NULL, NULL, APR_HOOK_MIDDLE);
         ap_hook_handler(parser_handler, NULL, NULL, APR_HOOK_MIDDLE);          ap_hook_handler(parser_handler, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_child_init(parser_module_init, NULL, NULL, APR_HOOK_MIDDLE);
 //      ap_hook_translate_name(parser_translate_handler, NULL, NULL, APR_HOOK_MIDDLE);  //      ap_hook_translate_name(parser_translate_handler, NULL, NULL, APR_HOOK_MIDDLE);
 //      ap_hook_check_user_id(parser_check_user_id, NULL, NULL, APR_HOOK_MIDDLE);  //      ap_hook_check_user_id(parser_check_user_id, NULL, NULL, APR_HOOK_MIDDLE);
 //      ap_hook_auth_checker(parser_auth_checker, NULL, NULL, APR_HOOK_MIDDLE);  //      ap_hook_auth_checker(parser_auth_checker, NULL, NULL, APR_HOOK_MIDDLE);
Line 319  module MODULE_VAR_EXPORT parser3_module Line 332  module MODULE_VAR_EXPORT parser3_module
         parser_access_checker,       /* [4] check access by host address */          parser_access_checker,       /* [4] check access by host address */
         0,                           /* [7] MIME type checker/setter */          0,                           /* [7] MIME type checker/setter */
         0,                           /* [8] fixups */          0,                           /* [8] fixups */
         0                            /* [10] logger */          0,                           /* [10] logger */
 #if MODULE_MAGIC_NUMBER >= 19970103          0,                           /* [3] header parser */
         ,0                           /* [3] header parser */          0,                           /* process initializer */
 #endif          parser_module_done           /* process exit/cleanup */
 #if MODULE_MAGIC_NUMBER >= 19970719  
         ,0                           /* process initializer */  
 #endif  
 #if MODULE_MAGIC_NUMBER >= 19970728  
         ,parser_module_done          /* process exit/cleanup */  
 #endif  
   
 #endif // STANDARD20_MODULE_STUFF  #endif // STANDARD20_MODULE_STUFF
 };  };
   
Line 345  module MODULE_VAR_EXPORT parser3_module Line 351  module MODULE_VAR_EXPORT parser3_module
   
 // interface to C++  // interface to C++
   
 #define PA_APLOG_EMERG  0       /* system is unusable */  #define PA_APLOG_EMERG          0       /* system is unusable */
 #define PA_APLOG_ALERT  1       /* action must be taken immediately */  #define PA_APLOG_ALERT          1       /* action must be taken immediately */
 #define PA_APLOG_CRIT   2       /* critical conditions */  #define PA_APLOG_CRIT           2       /* critical conditions */
 #define PA_APLOG_ERR    3       /* error conditions */  #define PA_APLOG_ERR            3       /* error conditions */
 #define PA_APLOG_WARNING        4       /* warning conditions */  #define PA_APLOG_WARNING        4       /* warning conditions */
 #define PA_APLOG_NOTICE 5       /* normal but significant condition */  #define PA_APLOG_NOTICE         5       /* normal but significant condition */
 #define PA_APLOG_INFO   6       /* informational */  #define PA_APLOG_INFO           6       /* informational */
 #define PA_APLOG_DEBUG  7       /* debug-level messages */  #define PA_APLOG_DEBUG          7       /* debug-level messages */
   
 #define PA_APLOG_LEVELMASK      7       /* mask off the level value */  #define PA_APLOG_LEVELMASK      7       /* mask off the level value */
   
 #define PA_APLOG_NOERRNO                (PA_APLOG_LEVELMASK + 1)  #define PA_APLOG_NOERRNO        (PA_APLOG_LEVELMASK + 1)
   
 #define PA_APLOG_MARK   __FILE__,__LINE__  #define PA_APLOG_MARK   __FILE__,__LINE__
   

Removed from v.1.2  
changed lines
  Added in v.1.4


E-mail: