diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 6684f91b508..75c4531bf05 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -969,6 +969,9 @@ static const char *get_canned_error_string(int status, { apr_pool_t *p = r->pool; 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) { case HTTP_MOVED_PERMANENTLY: @@ -1013,7 +1016,7 @@ static const char *get_canned_error_string(int status, case HTTP_METHOD_NOT_ALLOWED: return(apr_pstrcat(p, "
The requested method ", - ap_escape_html(r->pool, r->method), + ap_escape_html(r->pool, method), " is not allowed for this URL.
\n", NULL)); case HTTP_NOT_ACCEPTABLE: @@ -1026,7 +1029,7 @@ static const char *get_canned_error_string(int status, case HTTP_LENGTH_REQUIRED: s1 = apr_pstrcat(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.
\n",
NULL);
return(add_optional_notes(r, s1, "error-notes", "
",
- ap_escape_html(r->pool, r->method),
+ ap_escape_html(r->pool, method),
" not supported for current URL.
\n",
NULL);
return(add_optional_notes(r, s1, "error-notes", "