You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2001/11/11 19:43:39 UTC
[PATCH] Remove mod_dir showstopper
Greg and Ken and others,
Does this satisfactorily resolve the mod_dir overaggressive
redirection problem seen with non-GET requests for WebFolders?
I don't know what the UA string is for WebFolders, but I
figure someone out there knows. -- justin
Index: STATUS
===================================================================
RCS file: /home/cvs/httpd-2.0/STATUS,v
retrieving revision 1.325
diff -u -r1.325 STATUS
--- STATUS 2001/11/11 17:40:23 1.325
+++ STATUS 2001/11/11 18:27:39
@@ -63,14 +63,6 @@
filename extensions. Add...FilterByType will add to this quandry.
Some sort of resolution needs to be proposed,
- * mod_dir should normally redirect ALL directory requests which do
- not include a trailing slash on the URI. However, if a "notes"
- flag is set (say, via BrowserMatch), this behavior will be
- disabled for non-GET requests.
- Status: Greg volunteers
- MsgId: <20...@lyra.org>
- MsgId: <3A...@Golux.Com>
-
* mod_negotiation needs a new option or directive, something like
ForceLanguagePriority, to fall back to the LanguagePriority
directive instead of returning a "no acceptable variant" error.
Index: docs/conf/httpd-std.conf
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf,v
retrieving revision 1.63
diff -u -r1.63 httpd-std.conf
--- docs/conf/httpd-std.conf 2001/11/08 22:31:28 1.63
+++ docs/conf/httpd-std.conf 2001/11/11 18:27:39
@@ -903,6 +903,14 @@
BrowserMatch "JDK/1\.0" force-response-1.0
#
+# The following directive disables redirects on non-GET requests for
+# a directory that does not include the trailing slash. This fixes a
+# problem with Microsoft WebFolders which does not appropriately handle
+# redirects for folders with DAV methods.
+#
+BrowserMatch "Microsoft Data Access Internet Publishing Provider" no-redir-dir-non-get
+
+#
# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your_domain.com" to match your domain to enable.
#
Index: modules/mappers/mod_dir.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_dir.c,v
retrieving revision 1.34
diff -u -r1.34 mod_dir.c
--- modules/mappers/mod_dir.c 2001/08/23 21:05:42 1.34
+++ modules/mappers/mod_dir.c 2001/11/11 18:27:39
@@ -118,9 +118,12 @@
static int fixup_dir(request_rec *r)
{
- /* only (potentially) redirect for GET requests against directories */
- if (r->method_number != M_GET || r->finfo.filetype != APR_DIR) {
- return DECLINED;
+ /* only redirect for requests against directories or when we have
+ * a note that says that this browser can not handle redirs on
+ * non-GET requests (such as Microsoft's WebFolders). */
+ if (r->finfo.filetype != APR_DIR || (r->method_number != M_GET &&
+ apr_table_get(r->subprocess_env, "no-redir-dir-non-get"))) {
+ return DECLINED;
}
if (r->uri[0] == '\0' || r->uri[strlen(r->uri) - 1] != '/') {
Re: [PATCH] Remove mod_dir showstopper
Posted by Jacek Prucia <ja...@7bulls.com>.
Justin Erenkrantz <je...@ebuilt.com> wrote:
> Anyone know the User-Agent field that this broken MS implementation
> sends (or is the UA listed in the patch correct)? -- justin
UA field listed in patch seems to be correct. I'm playing around with Apache/mod_dav and Windows 2000 server as DAV client software. Apache combined access logs are cluttered with such bigass UA field:
"Microsoft Data Access Internet Publishing Provider DAV 1.1"
Since DAV protocol is integral system component (at least in Windows 2000 server) -- there's a fat chance that every Microsoft software (relaying on underlying system component) will be sending this UA field.
regards,
--
Jacek Prucia
7bulls.com S.A.
Re: [PATCH] Remove mod_dir showstopper
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Mon, Nov 12, 2001 at 01:46:23PM -0800, Greg Stein wrote:
> The patch looks very good to me!
Cool.
> Hmm... we have several pieces of information "redirect", "directories", and
> "non-GET methods". That is a lot to put into a single name. I say forget
> trying...
Yeah, I attempted.
> How about: redirect-carefully
Works for me. Conveys the concept.
Anyone know the User-Agent field that this broken MS implementation
sends (or is the UA listed in the patch correct)? -- justin
Re: [PATCH] Remove mod_dir showstopper
Posted by Greg Stein <gs...@lyra.org>.
The patch looks very good to me!
On Mon, Nov 12, 2001 at 04:28:38PM -0500, Rodent of Unusual Size wrote:
> Joshua Slive wrote:
> >
> > > How about "redirect-only-on-get"? Same length, more clewful.. :-)
> >
> > And some documentation would be nice. manual/env.html would be
> > the correct place.
>
> Actually, even "redirect-only-on-get" isn't clewful enough; it
> somehow needs to convey that the redirect involved only has
> to do with directory resources.
Hmm... we have several pieces of information "redirect", "directories", and
"non-GET methods". That is a lot to put into a single name. I say forget
trying...
How about: redirect-carefully
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: [PATCH] Remove mod_dir showstopper
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Joshua Slive wrote:
>
> > How about "redirect-only-on-get"? Same length, more clewful.. :-)
>
> And some documentation would be nice. manual/env.html would be
> the correct place.
Actually, even "redirect-only-on-get" isn't clewful enough; it
somehow needs to convey that the redirect involved only has
to do with directory resources.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
RE: [PATCH] Remove mod_dir showstopper
Posted by Joshua Slive <jo...@slive.ca>.
> From: Rodent of Unusual Size [mailto:Ken.Coar@Golux.Com]
>
> Ryan Bloom wrote:
> >
> > > +BrowserMatch "Microsoft Data Access Internet Publishing
> Provider" no-redir-dir-non-get +
> >
> > Any chance we can use an environment variable that isn't so cryptic?
>
> :-)
>
> How about "redirect-only-on-get"? Same length, more clewful.. :-)
And some documentation would be nice. manual/env.html would be the correct
place.
Joshua.
Re: [PATCH] Remove mod_dir showstopper
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Ryan Bloom wrote:
>
> > +BrowserMatch "Microsoft Data Access Internet Publishing Provider" no-redir-dir-non-get +
>
> Any chance we can use an environment variable that isn't so cryptic?
:-)
How about "redirect-only-on-get"? Same length, more clewful.. :-)
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: [PATCH] Remove mod_dir showstopper
Posted by Ryan Bloom <rb...@covalent.net>.
On Sunday 11 November 2001 10:43 am, Justin Erenkrantz wrote:
> Index: docs/conf/httpd-std.conf
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf,v
> retrieving revision 1.63
> diff -u -r1.63 httpd-std.conf
> --- docs/conf/httpd-std.conf 2001/11/08 22:31:28 1.63
> +++ docs/conf/httpd-std.conf 2001/11/11 18:27:39
> @@ -903,6 +903,14 @@
> BrowserMatch "JDK/1\.0" force-response-1.0
>
> #
> +# The following directive disables redirects on non-GET requests for
> +# a directory that does not include the trailing slash. This fixes a
> +# problem with Microsoft WebFolders which does not appropriately handle
> +# redirects for folders with DAV methods.
> +#
> +BrowserMatch "Microsoft Data Access Internet Publishing Provider" no-redir-dir-non-get +
Any chance we can use an environment variable that isn't so cryptic?
Ryan
______________________________________________________________
Ryan Bloom rbb@apache.org
Covalent Technologies rbb@covalent.net
--------------------------------------------------------------