Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 64579 invoked by uid 500); 2 Oct 2001 16:11:10 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 64562 invoked by uid 500); 2 Oct 2001 16:11:09 -0000 Delivered-To: apmail-apache-1.3-cvs@apache.org Date: 2 Oct 2001 16:08:58 -0000 Message-ID: <20011002160858.16404.qmail@icarus.apache.org> From: wrowe@apache.org To: apache-1.3-cvs@apache.org Subject: cvs commit: apache-1.3/src/modules/standard mod_vhost_alias.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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; } }