You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ics.uci.edu> on 1997/09/19 18:36:46 UTC

Re: [PATCH?] for mod_include and redirects

>    I *think* this corrects an oversight in mod_include.  It currently
>    only processes temporary redirects (what REDIRECT is defined to be)
>    and not any others.

Yep, it's a bug, but the patch is bad ...

>-    if (run_sub_req(rr) == REDIRECT) {
>+    if (is_HTTP_REDIRECT(run_sub_req(rr))) {

would cause run_sub_req(rr) to be run twice [the hazard of macros].
You need to save the return value in a variable and then check the variable.

....Roy