Uploaded image for project: 'JBoss Core Services'
  1. JBoss Core Services
  2. JBCS-385

The displayed "requested method GET" error message is not unexpected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • httpd 2.4.58 GA
    • None
    • httpd
    • None
    • 4
    • Hide

      1) Install httpd
      2) Add the following two lines to httpd.conf:

      TraceEnable off
      ErrorDocument 405 /i/dont/exist
      

      3) Use curl to make a trace request and observe the incorrect message:

      # curl -isX TRACE localhost
      HTTP/1.1 405 Method Not Allowed
      Date: Wed, 09 Aug 2017 12:47:36 GMT
      Server: Apache/2.4.23 (Red Hat)
      Allow: 
      Content-Length: 425
      Connection: close
      Content-Type: text/html; charset=iso-8859-1
      
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>
      <title>405 Method Not Allowed</title>
      </head><body>
      <h1>Method Not Allowed</h1>
      <p>The requested method GET is not allowed for the URL /.</p>
      <p>Additionally, a 405 Method Not Allowed
      error was encountered while trying to use an ErrorDocument to handle the request.</p>
      <hr>
      <address>Apache/2.4.23 (Red Hat) Server at localhost Port 80</address>
      </body></html>
      
      Show
      1) Install httpd 2) Add the following two lines to httpd.conf: TraceEnable off ErrorDocument 405 /i/dont/exist 3) Use curl to make a trace request and observe the incorrect message: # curl -isX TRACE localhost HTTP/1.1 405 Method Not Allowed Date: Wed, 09 Aug 2017 12:47:36 GMT Server: Apache/2.4.23 (Red Hat) Allow: Content-Length: 425 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>405 Method Not Allowed</title> </head><body> <h1>Method Not Allowed</h1> <p>The requested method GET is not allowed for the URL /.</p> <p>Additionally, a 405 Method Not Allowed error was encountered while trying to use an ErrorDocument to handle the request.</p> <hr> <address>Apache/2.4.23 (Red Hat) Server at localhost Port 80</address> </body></html>

      +++ This bug was initially created as a clone of Bug #1366449 +++
      Description of problem:

      In case ErrorDocument is configured but the value of "document" is invalid,
      the response is like below:

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>
      <title>405 Method Not Allowed</title>
      </head><body>
      <h1>Method Not Allowed</h1>
      <p>The requested method GET is not allowed for the URL /.</p>
      <p>Additionally, a 404 Not Found
      error was encountered while trying to use an ErrorDocument to handle the request.</p>
      </body></html>
      

      The messages in the page "requested method GET" is not expected and should be "TRACE
      since TRACE method is sent.

      Version-Release number of selected component (if applicable):
      Apache HTTP Server 2.4.23

      How reproducible:
      send TRACE method with invalid ErrorDocument setting.

      Steps to Reproduce:
      1.configure "TraceEnable off"
      2.configure ErrorDocument with non-existed error page
      3.send TRACE method

      Actual results:

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>
      <title>405 Method Not Allowed</title>
      </head><body>
      <h1>Method Not Allowed</h1>
      <p>The requested method GET is not allowed for the URL /.</p>
      <p>Additionally, a 404 Not Found
      error was encountered while trying to use an ErrorDocument to handle the request.</p>
      </body></html>
      

      Expected results:

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>
      <title>405 Method Not Allowed</title>
      </head><body>
      <h1>Method Not Allowed</h1>
      <p>The requested method TRACE is not allowed for the URL /.</p>
      <p>Additionally, a 404 Not Found
      error was encountered while trying to use an ErrorDocument to handle the request.</p>
      </body></html>
      

            rhn-engineering-jclere Jean-Frederic Clere
            rhn-support-csutherl Coty Sutherland
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: