You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2001/10/02 18:08:58 UTC

cvs commit: apache-1.3/src/modules/standard mod_vhost_alias.c

wrowe       01/10/02 09:08:58

  Modified:    src/modules/standard mod_vhost_alias.c
  Log:
    Steal a play from mod_proxy, which taught us this Win32 lesson.  Threaded
    local storage must be allocated with the Tls*() family of functions, or
    the dynamically loaded module _will_ clobber our clib's (msvcrt's) own
    thread saftey stacks.
  
    I _don't_ know what the other multithread platforms require in terms of
    initialization.  OS2/Netware maintainers can steal the idea from the
    Win32 get_cur_unique_id() implementation, to initialize other copies
    on the fly (if required.)  They may already call child_init for every
    thread, so child_init could call the master_init to set up this thread's
    variables.  Remember that the get_cur_unique_id() applies to straight
    un*x fork implementations as well, so protect with #ifdef PLAT sections.
  
  Revision  Changes    Path
  1.12      +3 -3      apache-1.3/src/modules/standard/mod_vhost_alias.c
  
  Index: mod_vhost_alias.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_vhost_alias.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_vhost_alias.c	2001/01/15 17:05:52	1.11
  +++ mod_vhost_alias.c	2001/10/02 16:08:57	1.12
  @@ -184,9 +184,9 @@
   	return "INTERNAL ERROR: unknown command info";
       }
   
  -    if (*map != '/') {
  +    if (!(ap_os_is_path_absolute(map))) {
   	if (strcasecmp(map, "none")) {
  -	    return "format string must start with '/' or be 'none'";
  +	    return "format string must be an absolute file path or 'none'";
   	}
   	*pmap = NULL;
   	*pmode = VHOST_ALIAS_NONE;
  @@ -420,7 +420,7 @@
       cgi = NULL;
       if (conf->cgi_root) {
   	cgi = strstr(r->uri, "cgi-bin/");
  -	if (cgi && cgi - r->uri != strspn(r->uri, "/")) {
  +	if (cgi && (cgi != r->uri + strspn(r->uri, "/"))) {
   	    cgi = NULL;
   	}
       }