From 5c4578338a2f65ff958001e11dfb38f93f558ae2 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Sat, 22 Sep 2018 01:14:21 +0300 Subject: [PATCH] Break HTTP code standard patch: Add comments --- .../patch_apache_break_http_code_standard.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/patches/patch_apache_break_http_code_standard.patch b/patches/patch_apache_break_http_code_standard.patch index e132581..8b410f2 100644 --- a/patches/patch_apache_break_http_code_standard.patch +++ b/patches/patch_apache_break_http_code_standard.patch @@ -27,19 +27,19 @@ This patch may break things badly, just be aware and proceed with care! Thanks. pos = (status + shortcut[i]); if (pos < shortcut[i + 1] && status_lines[pos] != NULL) { - return pos; -+ if (shortcut[i] == LEVEL_400) { -+ if (pos != (1 + shortcut[i])) { -+ return (0 + shortcut[i]); ++ if (shortcut[i] == LEVEL_400) { /* If code class is 400 */ ++ if (pos != (1 + shortcut[i])) { /* If code in 400 class is not 401, then */ ++ return (0 + shortcut[i]); /* Return 400 */ + } + else { -+ return pos; ++ return pos; /* Else return 401 */ + } + } -+ else if (shortcut[i] == LEVEL_500) { -+ return (shortcut[i - 1]); ++ else if (shortcut[i] == LEVEL_500) { /* If code class is 500 */ ++ return (0 + shortcut[i - 1]); /* Return first value of previous code class 400 */ + } + else { -+ return pos; ++ return pos; /* Return normal code */ + } } else {