You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/01/25 06:49:02 UTC
[PATCH] fix for UserDir directives without trailing '/' (PR#28)
See PR#28 for the report. While it is easy to work around that by doing:
UserDir http://some.other.server/~*/
instead of
UserDir http://some.other.server/~*
and it can be done using mod_rewrite, perhaps it is worth fixing? Patch
follows. I can't see it breaking anything, and it is _possible_ in some
cases (eg. multiviews) that adding the trailing slash would break the
intent.
Index: mod_userdir.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_userdir.c,v
retrieving revision 1.12
diff -c -r1.12 mod_userdir.c
*** 1.12 1997/01/01 18:10:42
--- mod_userdir.c 1997/01/25 05:43:07
***************
*** 144,152 ****
#ifdef __EMX__
/* Add support for OS/2 drive letters */
! if ((userdir[0] == '/') || (userdir[1] == ':')) {
#else
! if (userdir[0] == '/') {
#endif
if (x) {
if (strchr(x, ':')) {
--- 144,152 ----
#ifdef __EMX__
/* Add support for OS/2 drive letters */
! if ((userdir[0] == '/') || (userdir[1] == ':') || (userdir[0] == '\0')) {
#else
! if ((userdir[0] == '/') || (userdir[0] == '\0')) {
#endif
if (x) {
if (strchr(x, ':')) {
Re: [PATCH] fix for UserDir directives without trailing '/' (PR#28)
Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Fri, 24 Jan 1997, Marc Slemko wrote:
> See PR#28 for the report. While it is easy to work around that by doing:
>
> UserDir http://some.other.server/~*/
>
> instead of
>
> UserDir http://some.other.server/~*
>
> and it can be done using mod_rewrite, perhaps it is worth fixing? Patch
> follows. I can't see it breaking anything, and it is _possible_ in some
> cases (eg. multiviews) that adding the trailing slash would break the
> intent.
Agreed. I wrote the rewritten UserDir code originally (first
code-related thing I did for Apache, in fact), and it was always
something I meant to fix...
The patch looks good. +1 on including it ASAP.
--
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us> The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/