You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ha...@ooo.lanl.gov> on 1996/07/08 17:12:14 UTC
A patch to mod_userdir.c to better redirect ~user (1.1) (fwd)
Forwarded message:
> Message-Id: <19...@coke.indra.com>
> To: apache-bugs@mail.apache.org
> Subject: A patch to mod_userdir.c to better redirect ~user (1.1)
> Date: Sat, 06 Jul 1996 14:10:22 -0600
> From: Joe Ilacqua <sp...@indra.com>
> Status: RO
>
>
> The following is a very small patch to Apache 1.1. It alows /~user to
> be sent, as is, to a different server. The 1.1 UserDir directive
> allows /~user to be redirected to specific URL on the remote server,
> but not to user the remote server's idea to /~user. That is to say
> you can send /~user to "http://www.x.com/web/user", but not to
> "http://www.x.com/~user".
>
> With this patch, if the UserDir is on a remote host, and ends in "~",
> the rest of the URL is passed on with out inserting a "/". Thus
>
> UserDir http://www.x.org/~
>
> redirect "GET /~user/foo.html" to:
>
> http://www.x.org/~user/foo.html
>
> Without the patch it would be redirected to
>
> http://www.x.org/~/user/foo.html
>
> ->Spike
>
>
> *** mod_userdir.c.orig Sat Jul 6 13:42:45 1996
> --- mod_userdir.c Sat Jul 6 13:55:46 1996
> ***************
> *** 157,163 ****
> filename = pstrcat (r->pool, userdir, "/", w, NULL);
> }
> else if (strchr(userdir, ':')) {
> ! redirect = pstrcat(r->pool, userdir, "/", w, dname, NULL);
> table_set (r->headers_out, "Location", redirect);
> return REDIRECT;
> }
> --- 157,169 ----
> filename = pstrcat (r->pool, userdir, "/", w, NULL);
> }
> else if (strchr(userdir, ':')) {
> ! if (userdir[strlen(userdir) - 1] == '~')
> ! /* If userdir is on a remote server and ends in '~' redirect to
> ! * ~user on that server. spike@indra.com 7/6/96
> ! */
> ! redirect = pstrcat(r->pool, userdir, w, dname, NULL);
> ! else
> ! redirect = pstrcat(r->pool, userdir, "/", w, dname, NULL);
> table_set (r->headers_out, "Location", redirect);
> return REDIRECT;
> }
>
--
The rumor is that Jack Kevorkian has setup a Windows-NT users group.