Ignore:
Timestamp:
Jul 17, 2010, 6:53:37 PM (14 years ago)
Author:
andersk
Message:
mod_vhost_ldap: Fix /~user URLs.

This also re-enables the upstream apacheScriptAlias handling that was
previously disabled for no good reason (we don’t use it, but its
existence isn’t harmful), and fixes the same problem in it.  The patch
has been sent upstream to http://bugs.debian.org/589461 .
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/common/oursrc/httpdmods/mod_vhost_ldap.c

    r1588 r1589  
    454454    int sleep;
    455455    struct berval hostnamebv, shostnamebv;
     456    int ret = DECLINED;
    456457
    457458    reqc =
     
    608609    cgi = NULL;
    609610
    610 #if 0
    611611    if (reqc->cgiroot) {
    612612        cgi = strstr(r->uri, "cgi-bin/");
     
    625625          r->handler = "cgi-script";
    626626          apr_table_setn(r->notes, "alias-forced-type", r->handler);
     627          ret = OK;
    627628        }
    628 #endif
    629     /* This is a quick, dirty hack. I should be shot for taking 6.170
    630      * this term and being willing to write a quick, dirty hack. */
    631    
    632     if (strncmp(r->uri, "/~", 2) == 0) {
     629    } else if (strncmp(r->uri, "/~", 2) == 0) {
     630        /* This is a quick, dirty hack. I should be shot for taking 6.170
     631         * this term and being willing to write a quick, dirty hack. */   
    633632        char *username;
    634633        uid_t uid = (uid_t)atoll(reqc->uid);
     
    648647            }
    649648            r->filename = apr_pstrcat(r->pool, homedir, "/", USERDIR, r->uri + 2 + strlen(username), NULL);
     649            ret = OK;
    650650        }
    651651    } else if (r->uri[0] == '/') {
     
    713713
    714714    /* Hack to allow post-processing by other modules (mod_rewrite, mod_alias) */
    715     return DECLINED;
     715    return ret;
    716716}
    717717
Note: See TracChangeset for help on using the changeset viewer.