{
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:
case HTTP_METHOD_NOT_ALLOWED:
return(apr_pstrcat(p,
"<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",
NULL));
case HTTP_NOT_ACCEPTABLE:
case HTTP_LENGTH_REQUIRED:
s1 = apr_pstrcat(p,
"<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",
NULL);
return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
case HTTP_NOT_IMPLEMENTED:
s1 = apr_pstrcat(p,
"<p>",
- ap_escape_html(r->pool, r->method),
+ ap_escape_html(r->pool, method),
" not supported for current URL.<br />\n",
NULL);
return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
case HTTP_REQUEST_ENTITY_TOO_LARGE:
return(apr_pstrcat(p,
"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"
"the request exceeds the capacity limit.\n",
NULL));