You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Aaron Sherman <aj...@ajs.com> on 2000/11/06 21:30:48 UTC

mod_rewrite/6804: mod_rewrite refuses to proxy SSIs

>Number:         6804
>Category:       mod_rewrite
>Synopsis:       mod_rewrite refuses to proxy SSIs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Nov 06 12:40:03 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     ajs@ajs.com
>Release:        1.3.12
>Organization:
apache
>Environment:
Red Hat Linux V 6.2 w/ kernel 2.2.13 (this bug would exist on all platforms where mod_rewrite works).
>Description:
I had a rule:

  RewriteRule ^/(.*) http://www.xyz.com/$1 [P,L]

And desperately needed that to act on certain server-side include directives. Woefully, mod_rewrite.c explicitly disallows this, as an SSI is technically a subrequest.

Is there any real reason that an SSI should not be proxied, or was this an oversight in mod_rewrite? I really need this functionality, and would rather not continue to maintain my own hacked version of mod_rewrite....
>How-To-Repeat:

>Fix:
--- apache_1.3.12/src/modules/standard/mod_rewrite.c.orig       Sun Jan 16 13:06:30 2000
+++ apache_1.3.12/src/modules/standard/mod_rewrite.c    Mon Nov  6 15:15:54 2000
@@ -1633,7 +1633,7 @@
          */
         if (r->main != NULL &&
             (p->flags & RULEFLAG_IGNOREONSUBREQ ||
-             p->flags & RULEFLAG_PROXY          ||
+             /*p->flags & RULEFLAG_PROXY          ||*/
              p->flags & RULEFLAG_FORCEREDIRECT    )) {
             continue;
         }
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]