mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Merge PR#419: make sure the right method is displayed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -969,6 +969,9 @@ static const char *get_canned_error_string(int status,
|
|||||||
{
|
{
|
||||||
apr_pool_t *p = r->pool;
|
apr_pool_t *p = r->pool;
|
||||||
const char *error_notes, *h1, *s1;
|
const char *error_notes, *h1, *s1;
|
||||||
|
const char *method = r->method;
|
||||||
|
if (r->subprocess_env && apr_table_get(r->subprocess_env, "REQUEST_METHOD"))
|
||||||
|
method = apr_table_get(r->subprocess_env, "REQUEST_METHOD");
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case HTTP_MOVED_PERMANENTLY:
|
case HTTP_MOVED_PERMANENTLY:
|
||||||
@@ -1013,7 +1016,7 @@ static const char *get_canned_error_string(int status,
|
|||||||
case HTTP_METHOD_NOT_ALLOWED:
|
case HTTP_METHOD_NOT_ALLOWED:
|
||||||
return(apr_pstrcat(p,
|
return(apr_pstrcat(p,
|
||||||
"<p>The requested method ",
|
"<p>The requested method ",
|
||||||
ap_escape_html(r->pool, r->method),
|
ap_escape_html(r->pool, method),
|
||||||
" is not allowed for this URL.</p>\n",
|
" is not allowed for this URL.</p>\n",
|
||||||
NULL));
|
NULL));
|
||||||
case HTTP_NOT_ACCEPTABLE:
|
case HTTP_NOT_ACCEPTABLE:
|
||||||
@@ -1026,7 +1029,7 @@ static const char *get_canned_error_string(int status,
|
|||||||
case HTTP_LENGTH_REQUIRED:
|
case HTTP_LENGTH_REQUIRED:
|
||||||
s1 = apr_pstrcat(p,
|
s1 = apr_pstrcat(p,
|
||||||
"<p>A request of the requested method ",
|
"<p>A request of the requested method ",
|
||||||
ap_escape_html(r->pool, r->method),
|
ap_escape_html(r->pool, method),
|
||||||
" requires a valid Content-length.<br />\n",
|
" requires a valid Content-length.<br />\n",
|
||||||
NULL);
|
NULL);
|
||||||
return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
|
return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
|
||||||
@@ -1036,7 +1039,7 @@ static const char *get_canned_error_string(int status,
|
|||||||
case HTTP_NOT_IMPLEMENTED:
|
case HTTP_NOT_IMPLEMENTED:
|
||||||
s1 = apr_pstrcat(p,
|
s1 = apr_pstrcat(p,
|
||||||
"<p>",
|
"<p>",
|
||||||
ap_escape_html(r->pool, r->method),
|
ap_escape_html(r->pool, method),
|
||||||
" not supported for current URL.<br />\n",
|
" not supported for current URL.<br />\n",
|
||||||
NULL);
|
NULL);
|
||||||
return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
|
return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
|
||||||
@@ -1058,7 +1061,7 @@ static const char *get_canned_error_string(int status,
|
|||||||
case HTTP_REQUEST_ENTITY_TOO_LARGE:
|
case HTTP_REQUEST_ENTITY_TOO_LARGE:
|
||||||
return(apr_pstrcat(p,
|
return(apr_pstrcat(p,
|
||||||
"The requested resource does not allow request data with ",
|
"The requested resource does not allow request data with ",
|
||||||
ap_escape_html(r->pool, r->method),
|
ap_escape_html(r->pool, method),
|
||||||
" requests, or the amount of data provided in\n"
|
" requests, or the amount of data provided in\n"
|
||||||
"the request exceeds the capacity limit.\n",
|
"the request exceeds the capacity limit.\n",
|
||||||
NULL));
|
NULL));
|
||||||
|
@@ -127,6 +127,7 @@ static void ap_die_r(int type, request_rec *r, int recursive_error)
|
|||||||
*/
|
*/
|
||||||
update_r_in_filters(r_1st_err->proto_output_filters, r, r_1st_err);
|
update_r_in_filters(r_1st_err->proto_output_filters, r, r_1st_err);
|
||||||
update_r_in_filters(r_1st_err->input_filters, r, r_1st_err);
|
update_r_in_filters(r_1st_err->input_filters, r, r_1st_err);
|
||||||
|
recursive_error = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
custom_response = NULL; /* Do NOT retry the custom thing! */
|
custom_response = NULL; /* Do NOT retry the custom thing! */
|
||||||
|
Reference in New Issue
Block a user