Instructions to set up a basic LAMP+SSH server environment
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

  1. uthor: Pekka Helenius (~Fincer), 2018
  2. Patch: Remove error HTML body from Apache server output message
  3. Removes additional error messages as well.
  4. Do not give any hints about existence of Apache ErrorDocument to the client
  5. This patch is useful in some cases but can bury underneath problems in server
  6. configuration. Thus, use discretion before implementing the patch
  7. in your Apache server.
  8. This patch removes default error pages returned by an erroneous HTTP request.
  9. If you need to use error pages, customize them in your Apache configs.
  10. @@ -1531,7 +1531,7 @@ AP_DECLARE(void) ap_send_error_response(
  11. /* can't count on a charset filter being in place here,
  12. * so do ebcdic->ascii translation explicitly (if needed)
  13. */
  14. -
  15. +/*
  16. ap_rvputs_proto_in_ascii(r,
  17. DOCTYPE_HTML_2_0
  18. "<html><head>\n<title>", title,
  19. @@ -1549,9 +1549,9 @@ AP_DECLARE(void) ap_send_error_response(
  20. "ErrorDocument to handle the request.</p>\n", NULL);
  21. }
  22. ap_rvputs_proto_in_ascii(r, ap_psignature("<hr>\n", r), NULL);
  23. - ap_rvputs_proto_in_ascii(r, "</body></html>\n", NULL);
  24. - }
  25. - ap_finalize_request_protocol(r);
  26. + ap_rvputs_proto_in_ascii(r, "</body></html>\n", NULL);*/
  27. + }/*
  28. + ap_finalize_request_protocol(r);*/
  29. }
  30. /*