You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2016/02/16 18:33:31 UTC
svn commit: r1730723 - in /httpd/httpd/trunk: include/httpd.h
modules/http/http_protocol.c
Author: jim
Date: Tue Feb 16 17:33:31 2016
New Revision: 1730723
URL: http://svn.apache.org/viewvc?rev=1730723&view=rev
Log:
Add 451... Needed to adjust RESPONSE_CODES which
was not in the provided patch
BUGZ# 58985
Modified:
httpd/httpd/trunk/include/httpd.h
httpd/httpd/trunk/modules/http/http_protocol.c
Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=1730723&r1=1730722&r2=1730723&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Tue Feb 16 17:33:31 2016
@@ -482,7 +482,7 @@ AP_DECLARE(const char *) ap_get_server_b
* When adding a new code here add it to status_lines as well.
* A future version should dynamically generate the apr_table_t at startup.
*/
-#define RESPONSE_CODES 83
+#define RESPONSE_CODES 103
#define HTTP_CONTINUE 100
#define HTTP_SWITCHING_PROTOCOLS 101
@@ -532,6 +532,7 @@ AP_DECLARE(const char *) ap_get_server_b
#define HTTP_PRECONDITION_REQUIRED 428
#define HTTP_TOO_MANY_REQUESTS 429
#define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
+#define HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
#define HTTP_INTERNAL_SERVER_ERROR 500
#define HTTP_NOT_IMPLEMENTED 501
#define HTTP_BAD_GATEWAY 502
Modified: httpd/httpd/trunk/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_protocol.c?rev=1730723&r1=1730722&r2=1730723&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_protocol.c (original)
+++ httpd/httpd/trunk/modules/http/http_protocol.c Tue Feb 16 17:33:31 2016
@@ -146,7 +146,27 @@ static const char * const status_lines[R
"429 Too Many Requests",
NULL, /* 430 */
"431 Request Header Fields Too Large",
-#define LEVEL_500 71
+ NULL, /* 432 */
+ NULL, /* 433 */
+ NULL, /* 434 */
+ NULL, /* 435 */
+ NULL, /* 436 */
+ NULL, /* 437 */
+ NULL, /* 438 */
+ NULL, /* 439 */
+ NULL, /* 440 */
+ NULL, /* 441 */
+ NULL, /* 442 */
+ NULL, /* 443 */
+ NULL, /* 444 */
+ NULL, /* 445 */
+ NULL, /* 446 */
+ NULL, /* 447 */
+ NULL, /* 448 */
+ NULL, /* 449 */
+ NULL, /* 450 */
+ "451 Unavailable For Legal Reasons",
+#define LEVEL_500 91
"500 Internal Server Error",
"501 Not Implemented",
"502 Bad Gateway",
@@ -1313,6 +1333,12 @@ static const char *get_canned_error_stri
"request as the requested host name does not match\n"
"the Server Name Indication (SNI) in use for this\n"
"connection.</p>\n");
+ case HTTP_UNAVAILABLE_FOR_LEGAL_REASONS:
+ s1 = apr_pstrcat(p,
+ "<p>Access to ", ap_escape_html(r->pool, r->uri),
+ "\nhas been denied for legal reasons.<br />\n",
+ NULL);
+ return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
default: /* HTTP_INTERNAL_SERVER_ERROR */
/*
* This comparison to expose error-notes could be modified to