From 8ae10a2a98c6caaa41e1da06a5763c0b69084154 Mon Sep 17 00:00:00 2001
From: "William A. Rowe Jr" \n",
+ "\">here. \n",
+ "\">here. This resource is only accessible "
"through the proxy\n",
ap_escape_html(r->pool, location),
" \n",
+ "configure your client to use that proxy. This server could not verify that you\n"
"are authorized to access the document\n"
"requested. Either you supplied the wrong\n"
"credentials (e.g., bad password), or your\n"
"browser doesn't understand how to supply\n"
- "the credentials required. \n");
+ "the credentials required. \n",
+ " Your browser sent a request that "
+ "this server could not understand. \n"));
+ " You don't have permission to access ",
ap_escape_html(r->pool, r->uri),
- "\non this server. \n",
+ "\non this server. The requested URL ",
ap_escape_html(r->pool, r->uri),
- " was not found on this server. \n",
+ " was not found on this server. The requested method ", r->method,
" is not allowed for the URL ",
ap_escape_html(r->pool, r->uri),
- ". \n",
+ ". An appropriate representation of the "
"requested resource ",
ap_escape_html(r->pool, r->uri),
- " could not be found on this server. \n",
+ " could not be found on this server. A request of the requested method ",
r->method,
- " requires a valid Content-length. \n",
+ " requires a valid Content-length. \n"));
+ return(add_optional_notes(r, s1, "error-notes", " The precondition on the request for the URL ",
ap_escape_html(r->pool, r->uri),
- " evaluated to false. \n",
+ " evaluated to false. ",
ap_escape_html(r->pool, r->method), " to ",
ap_escape_html(r->pool, r->uri),
- " not supported. \n",
+ " not supported. \n"));
+ return(add_optional_notes(r, s1, "error-notes", " " CRLF;
- return(add_optional_notes(r, s1, "error-notes", " \n"));
+ s1 = " The proxy server received an invalid" CRLF
+ "response from an upstream server. A variant for the requested resource\n \n",
+ "This indicates a configuration error. I'm tired of waiting for your request. The requested resource \n";
- return(add_optional_notes(r, s1, "error-notes", " \n"));
+ s1 = " The requested URL's length exceeds the capacity\n"
+ "limit for this server. The supplied request data is not in a format\n"
+ "acceptable for processing by this resource. None of the range-specifier values in the Range\n"
"request-header field overlap the current extent\n"
- "of the selected resource.\n");
+ "of the selected resource. \n"
- "The client sent The expectation given in the Expect request-header"
+ "\nfield could not be met by this server. The client sent
\nYou will need to "
- "configure your client to use that proxy.
\n",
"error-notes",
- "
\n",
NULL);
- return(add_optional_notes(r, s1, "error-notes", "
\n",
NULL);
- return(add_optional_notes(r, s1, "error-notes", "
" CRLF;
+ return(add_optional_notes(r, s1, "error-notes", "\n",
+ "
\n",
ap_escape_html(r->pool, r->uri),
"\n
\nis itself a negotiable resource. "
- "This indicates a configuration error.
",
+ "
",
ap_escape_html(r->pool, r->uri),
"
\nis no longer available on this server "
"and there is no forwarding address.\n"
- "Please remove all references to this resource.\n",
+ "Please remove all references to this resource.
\n";
+ return(add_optional_notes(r, s1, "error-notes", "\n Expect: ",
+ "
\n Expect: ",
apr_table_get(r->headers_in, "Expect"), "\n
\n"
- "but we only allow the 100-continue expectation.\n",
+ "but we only allow the 100-continue expectation.
The server understands the media type of the\n" "request entity, but was unable to process the\n" - "contained instructions.\n"); + "contained instructions.
\n"); case HTTP_LOCKED: - return("The requested resource is currently locked.\n" + return("The requested resource is currently locked.\n" "The lock must be released or proper identification\n" - "given before the method can be applied.\n"); + "given before the method can be applied.
\n"); case HTTP_FAILED_DEPENDENCY: - return("The method could not be performed on the resource\n" + return("The method could not be performed on the resource\n" "because the requested action depended on another\n" - "action and that other action failed.\n"); + "action and that other action failed.
\n"); case HTTP_INSUFFICIENT_STORAGE: - return("The method could not be performed on the resource\n" + return("The method could not be performed on the resource\n" "because the server is unable to store the\n" "representation needed to successfully complete the\n" "request. There is insufficient free space left in\n" - "your storage allocation.\n"); + "your storage allocation.
\n"); case HTTP_SERVICE_UNAVAILABLE: - return("The server is temporarily unable to service your\n" + return("The server is temporarily unable to service your\n" "request due to maintenance downtime or capacity\n" - "problems. Please try again later.\n"); + "problems. Please try again later.
\n"); case HTTP_GATEWAY_TIME_OUT: - return("The proxy server did not receive a timely response\n" - "from the upstream server.\n"); + return("The proxy server did not receive a timely response\n" + "from the upstream server.
\n"); case HTTP_NOT_EXTENDED: - return("A mandatory extension policy in the request is not\n" - "accepted by the server for this resource.\n"); + return("A mandatory extension policy in the request is not\n" + "accepted by the server for this resource.
\n"); default: /* HTTP_INTERNAL_SERVER_ERROR */ /* * This comparison to expose error-notes could be modified to @@ -1739,20 +1739,20 @@ static const char *get_canned_error_string(int status, if (((error_notes = apr_table_get(r->notes, "error-notes")) != NULL) && (h1 = apr_table_get(r->notes, "verbose-error-to")) != NULL && (strcmp(h1, "*") == 0)) { - return(apr_pstrcat(p, error_notes, "\n", NULL)); + return(apr_pstrcat(p, error_notes, "
\n", NULL)); } else { return(apr_pstrcat(p, - "The server encountered an internal error or\n" + "The server encountered an internal error or\n" "misconfiguration and was unable to complete\n" - "your request.
\n" - "Please contact the server administrator,\n ", + "your request.
\n" + "Please contact the server administrator,\n ", ap_escape_html(r->pool, r->server->server_admin), " and inform them of the time the error occurred,\n" "and anything you might have done that may have\n" - "caused the error.
\n" - "More information about this error may be available\n" - "in the server error log.
\n", + "caused the error.
\n" + "More information about this error may be available\n" + "in the server error log.
\n", NULL)); } /* @@ -1760,12 +1760,12 @@ static const char *get_canned_error_string(int status, * fix the problem directly since many users don't have access to * the error_log (think University sites) even though they can easily * get this error by misconfiguring an htaccess file. However, the - e error notes tend to include the real file pathname in this case, + * e error notes tend to include the real file pathname in this case, * which some people consider to be a breach of privacy. Until we * can figure out a way to remove the pathname, leave this commented. * * if ((error_notes = apr_table_get(r->notes, "error-notes")) != NULL) { - * return(apr_pstrcat(p, error_notes, "\n", NULL); + * return(apr_pstrcat(p, error_notes, "
\n", NULL); * } * else { * return ""; @@ -1932,10 +1932,10 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) NULL); if (recursive_error) { - ap_rvputs_proto_in_ascii(rlast, "Additionally, a ", + ap_rvputs_proto_in_ascii(rlast, "
Additionally, a ", status_lines[ap_index_of_response(recursive_error)], "\nerror was encountered while trying to use an " - "ErrorDocument to handle the request.\n", NULL); + "ErrorDocument to handle the request.
\n", NULL); } ap_rvputs_proto_in_ascii(rlast, ap_psignature("