]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
followup to r1861542: return early from error path
authorEric Covener <covener@apache.org>
Tue, 18 Jun 2019 11:04:50 +0000 (11:04 +0000)
committerEric Covener <covener@apache.org>
Tue, 18 Jun 2019 11:04:50 +0000 (11:04 +0000)
avoid setting a location: header of a non-URL 500 error path

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861569 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_alias.c

index 3297a975f62e9489a0446351c46a35ca7b49190b..569d331e7f4f0cc7205395892e50b001ccdca84e 100644 (file)
@@ -612,11 +612,11 @@ static int translate_alias_redir(request_rec *r)
                                   orig_target, r->uri, ret);
                 }
                 if (!ap_is_url(ret)) {
-                    status = HTTP_INTERNAL_SERVER_ERROR;
                     ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00674)
                                   "cannot redirect '%s' to '%s'; "
                                   "target is not a valid absoluteURI or abs_path",
                                   r->uri, ret);
+                    return HTTP_INTERNAL_SERVER_ERROR;
                 }
             }
             /* append requested query only, if the config didn't
@@ -667,11 +667,11 @@ static int fixup_redir(request_rec *r)
                                   orig_target, r->uri, ret);
                 }
                 if (!ap_is_url(ret)) {
-                    status = HTTP_INTERNAL_SERVER_ERROR;
                     ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00676)
                                   "cannot redirect '%s' to '%s'; "
                                   "target is not a valid absoluteURI or abs_path",
                                   r->uri, ret);
+                    return HTTP_INTERNAL_SERVER_ERROR;
                 }
             }
             /* append requested query only, if the config didn't