perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject [mp2] modperl_config_insert_request's path argument
Date Sat, 03 Jul 2004 00:59:22 GMT
Philippe, I've noticed this comment http_config.h:

struct cmd_parms_struct {
     /** If configuring for a directory, pathname of that directory.
      *  NOPE!  That's what it meant previous to the existance of <Files>,
      * <Location> and regex matching.  Now the only usefulness that can be
      * derived from this field is whether a command is being called in a
      * server context (path == NULL) or being called in a dir context
      * (path != NULL).  */
     char *path;

Which I think makes the optional 2nd arg 'path' to s->add_config redundant. 
Moreover the default (r->filename) might be incorrect if it's NULL. So should 
we drop it completely in here:

const char *modperl_config_insert_request(pTHX_
                                           request_rec *r,
                                           SV *lines,
                                           char *path,
                                           int override)
     const char *errmsg;
     ap_conf_vector_t *dconf = ap_create_per_dir_config(r->pool);

     errmsg = modperl_config_insert(aTHX_
                                    r->server, r->pool, r->pool,
                                    override, path,
                                    dconf, lines);

replacing it with '/' or something? Or am I misreading it? We don't have any 
tests for this and I haven't looked at config stuff for ages, so I'm not sure 
whether we should keep it or drop it.

What do you think?

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message