From: André Malo Date: Sun, 3 Aug 2003 19:14:55 +0000 (+0000) Subject: subreq_ok *is* a macro. X-Git-Tag: pre_ajp_proxy~1303 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57cf2330b2f438399ae2168c234838dc0808c806;p=apache subreq_ok *is* a macro. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100893 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index f40492d9b2..d3692db95a 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -224,6 +224,15 @@ #define LEFT_CURLY '{' #define RIGHT_CURLY '}' +/* + * check that a subrequest won't cause infinite recursion + * + * either not in a subrequest, or in a subrequest + * and URIs aren't NULL and sub/main URIs differ + */ +#define subreq_ok(r) (!r->main || \ + (r->main->uri && r->uri && strcmp(r->main->uri, r->uri))) + /* * +-------------------------------------------------------+ @@ -1520,17 +1529,6 @@ static const char *lookup_header(request_rec *r, const char *name) return val; } -/* check that a subrequest won't cause infinite recursion */ -static int subreq_ok(request_rec *r) -{ - /* - * either not in a subrequest, or in a subrequest - * and URIs aren't NULL and sub/main URIs differ - */ - return (!r->main || - (r->main->uri && r->uri && strcmp(r->main->uri, r->uri))); -} - /* * generic variable lookup */