arrfab / rpms / httpd

Forked from rpms/httpd 5 years ago
Clone

Blame SOURCES/httpd-2.4.6-r1748212.patch

48b77b
# ./pullrev.sh 1748212
48b77b
http://svn.apache.org/viewvc?view=revision&revision=1748212
48b77b
48b77b
https://bugzilla.redhat.com/show_bug.cgi?id=1343582
48b77b
48b77b
diff -uap httpd-2.4.6/include/httpd.h.r1748212 httpd-2.4.6/include/httpd.h
48b77b
--- httpd-2.4.6/include/httpd.h.r1748212
48b77b
+++ httpd-2.4.6/include/httpd.h
48b77b
@@ -477,7 +477,7 @@ AP_DECLARE(const char *) ap_get_server_b
48b77b
  * When adding a new code here add it to status_lines as well.
48b77b
  * A future version should dynamically generate the apr_table_t at startup.
48b77b
  */
48b77b
-#define RESPONSE_CODES 83
48b77b
+#define RESPONSE_CODES 103
48b77b
 
48b77b
 #define HTTP_CONTINUE                        100
48b77b
 #define HTTP_SWITCHING_PROTOCOLS             101
48b77b
@@ -525,6 +525,7 @@ AP_DECLARE(const char *) ap_get_server_b
48b77b
 #define HTTP_PRECONDITION_REQUIRED           428
48b77b
 #define HTTP_TOO_MANY_REQUESTS               429
48b77b
 #define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
48b77b
+#define HTTP_UNAVAILABLE_FOR_LEGAL_REASONS   451
48b77b
 #define HTTP_INTERNAL_SERVER_ERROR           500
48b77b
 #define HTTP_NOT_IMPLEMENTED                 501
48b77b
 #define HTTP_BAD_GATEWAY                     502
48b77b
diff -uap httpd-2.4.6/modules/http/http_protocol.c.r1748212 httpd-2.4.6/modules/http/http_protocol.c
48b77b
--- httpd-2.4.6/modules/http/http_protocol.c.r1748212
48b77b
+++ httpd-2.4.6/modules/http/http_protocol.c
48b77b
@@ -146,7 +146,27 @@ static const char * const status_lines[R
48b77b
     "429 Too Many Requests",
48b77b
     NULL, /* 430 */
48b77b
     "431 Request Header Fields Too Large",
48b77b
-#define LEVEL_500 71
48b77b
+    NULL, /* 432 */
48b77b
+    NULL, /* 433 */
48b77b
+    NULL, /* 434 */
48b77b
+    NULL, /* 435 */
48b77b
+    NULL, /* 436 */
48b77b
+    NULL, /* 437 */
48b77b
+    NULL, /* 438 */
48b77b
+    NULL, /* 439 */
48b77b
+    NULL, /* 440 */
48b77b
+    NULL, /* 441 */
48b77b
+    NULL, /* 442 */
48b77b
+    NULL, /* 443 */
48b77b
+    NULL, /* 444 */
48b77b
+    NULL, /* 445 */
48b77b
+    NULL, /* 446 */
48b77b
+    NULL, /* 447 */
48b77b
+    NULL, /* 448 */
48b77b
+    NULL, /* 449 */
48b77b
+    NULL, /* 450 */
48b77b
+    "451 Unavailable For Legal Reasons",
48b77b
+#define LEVEL_500 91
48b77b
     "500 Internal Server Error",
48b77b
     "501 Not Implemented",
48b77b
     "502 Bad Gateway",
48b77b
@@ -1295,6 +1315,12 @@ static const char *get_canned_error_stri
48b77b
     case HTTP_NETWORK_AUTHENTICATION_REQUIRED:
48b77b
         return("

The client needs to authenticate to gain\n"

48b77b
                "network access.

\n");
48b77b
+    case HTTP_UNAVAILABLE_FOR_LEGAL_REASONS:
48b77b
+        s1 = apr_pstrcat(p,
48b77b
+                         "

Access to ", ap_escape_html(r->pool, r->uri),

48b77b
+                         "\nhas been denied for legal reasons.
\n",
48b77b
+                         NULL);
48b77b
+        return(add_optional_notes(r, s1, "error-notes", "

\n"));
48b77b
     default:                    /* HTTP_INTERNAL_SERVER_ERROR */
48b77b
         /*
48b77b
          * This comparison to expose error-notes could be modified to