Browse Source

Break HTTP code standard patch: Add comments

master
Pekka Helenius 3 years ago
committed by GitHub
parent
commit
5c4578338a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      patches/patch_apache_break_http_code_standard.patch

+ 7
- 7
patches/patch_apache_break_http_code_standard.patch View File

@ -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 {


Loading…
Cancel
Save