[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#204508: marked as done (apache: mod_rewrite can't rewrite to filenames containing a '?')



Your message dated Mon, 27 Oct 2003 17:43:40 +0000
with message-id <20031027174340.GA5172@parcelfarce.linux.theplanet.co.uk>
and subject line Upstream says this is not a bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 7 Aug 2003 20:10:26 +0000
>From phaethon@nns.ch Thu Aug 07 15:10:24 2003
Return-path: <phaethon@nns.ch>
Received: from aquila.nns.ch [62.32.16.77] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19kr5b-00019A-00; Thu, 07 Aug 2003 15:10:23 -0500
Received: by aquila.nns.ch (Postfix, from userid 1000)
	id 704D7C032A8; Thu,  7 Aug 2003 22:10:17 +0200 (CEST)
From: Jade Nicoletti <phaethon@nns.ch>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apache: mod_rewrite can't rewrite to filenames containing a '?'
X-Mailer: reportbug 1.50
Date: Thu, 07 Aug 2003 22:10:17 +0200
Message-Id: <20030807201017.704D7C032A8@aquila.nns.ch>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-12.3 required=4.0
	tests=BAYES_20,HAS_PACKAGE,PATCH_UNIFIED_DIFF
	autolearn=ham version=2.53-bugs.debian.org_2003_07_20
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_07_20 (1.174.2.15-2003-03-30-exp)

Package: apache
Version: 1.3.27-0.1
Severity: wishlist
Tags: patch


Mod_rewrite can't rewrite URIs to filenames containing a questionmark,
as they are generated by "wget -E" when mirroring dynamic content to
static files, for example. I patched mod_rewrite to make it accept a
further rule flag: "nosplit". When this flag is set, mod_rewrite will
not split out the query string from the filename.


--- mod_rewrite.h-original	Thu Aug  7 21:38:42 2003
+++ mod_rewrite.h	Thu Aug  7 21:43:12 2003
@@ -218,6 +218,7 @@
 #define RULEFLAG_QSAPPEND           1<<11
 #define RULEFLAG_NOCASE             1<<12
 #define RULEFLAG_NOESCAPE           1<<13
+#define RULEFLAG_NOSPLIT            1<<14
 
 #define ACTION_NORMAL               1<<0
 #define ACTION_NOESCAPE             1<<1
--- mod_rewrite.c-original	Thu Aug  7 21:38:53 2003
+++ mod_rewrite.c	Thu Aug  7 21:41:34 2003
@@ -936,6 +936,10 @@
              || strcasecmp(key, "NC") == 0    ) {
         cfg->flags |= RULEFLAG_NOCASE;
     }
+    else if (   strcasecmp(key, "nosplit") == 0
+             || strcasecmp(key, "NSA") == 0    ) {
+        cfg->flags |= RULEFLAG_NOSPLIT;
+    }
     else {
         return ap_pstrcat(p, "RewriteRule: unknown flag '", key, "'\n", NULL);
     }
@@ -1980,7 +1984,9 @@
      *  an on-the-fly generated QUERY_STRING part into r->args
      */
     r->filename = ap_pstrdup(r->pool, newuri);
-    splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND);
+    if (!(p->flags & RULEFLAG_NOSPLIT)) {
+        splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND);
+    }
 
     /*
      *   Again add the previously stripped per-directory location



-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux aquila 2.4.20 #1 Son Jan 26 16:37:44 CET 2003 i686
Locale: LANG=de_CH, LC_CTYPE=de_CH.UTF-8

Versions of packages apache depends on:
ii  apache-common                1.3.27-0.1  Support files for all Apache webse
ii  dpkg                         1.10.9      Package maintenance system for Deb
ii  libc6                        2.2.5-11.5  GNU C Library: Shared libraries an
ii  libdb2                       2:2.7.7.0-7 The Berkeley database routines (ru
ii  libexpat1                    1.95.5-1    XML parsing C library - runtime li
ii  logrotate                    3.6.5-2     Log rotation utility
ii  mime-support                 3.18-1.3    MIME files 'mime.types' & 'mailcap
ii  perl                         5.6.1-8.2   Larry Wall's Practical Extraction 
ii  perl [perl5]                 5.6.1-8.2   Larry Wall's Practical Extraction 


---------------------------------------
Received: (at 204508-done) by bugs.debian.org; 27 Oct 2003 17:43:42 +0000
>From willy@www.linux.org.uk Mon Oct 27 11:43:41 2003
Return-path: <willy@www.linux.org.uk>
Received: from parcelfarce.linux.theplanet.co.uk (www.linux.org.uk) [195.92.249.252] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AEBP2-0004RS-00; Mon, 27 Oct 2003 11:43:41 -0600
Received: from willy by www.linux.org.uk with local (Exim 4.22)
	id 1AEBP2-0005hF-FN
	for 204508-done@bugs.debian.org; Mon, 27 Oct 2003 17:43:40 +0000
Date: Mon, 27 Oct 2003 17:43:40 +0000
From: Matthew Wilcox <willy@debian.org>
To: 204508-done@bugs.debian.org
Subject: Upstream says this is not a bug
Message-ID: <20031027174340.GA5172@parcelfarce.linux.theplanet.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.1i
Sender: <willy@www.linux.org.uk>
Delivered-To: 204508-done@bugs.debian.org
X-Spam-Status: No, hits=1.0 required=4.0
	tests=BAYES_70
	version=2.53-bugs.debian.org_2003_10_21
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_21 (1.174.2.15-2003-03-30-exp)


I am therefore closing this bug.

------- Additional Comments From nd@perlig.de  2003-10-27 17:25 -------
Thom May and /me talked about this one a while ago on IRC and came to the
conclusion that there's no issue to fix. One can easily use %3F in conclusion
with NE option to treat the question mark as part of the name. That is what NE
is intended for -- and how URIs *have to* be written.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk



Reply to: