https://issues.apache.org/bugzilla/show_bug.cgi?id=51201
--- Comment #2 from Guillermo Grandes <[email protected]> 2011-05-15 17:28:44 UTC --- Thanks Nick, There is no third-party components, the error you mention is standard core directive "ErrorDocument", a cutted/minimalist english text version of the standard error (HTTP_NOT_IMPLEMENTED.html.var): ErrorDocument 501 /errors/501.txt $ cat 501.txt ---- begin --- ERROR-501 NOT_IMPLEMENTED The server does not support the action requested by the browser. ---- end ----- ================== He repeated the test 1 & 3, disabling the ErrorDocument directive, the result is different in Test 1, returns 501 instead of 302 (correct behavior): === Test 1 === OK ========================================== RewriteCond %{REQUEST_METHOD} !^(HEAD|POST|GET)$ RewriteRule (.*) - [L] # Should not come here RewriteRule ^/ http://test.localhost/?method=%{REQUEST_METHOD} [R=302,L] === Request Test 1: NONE / HTTP/1.0 Accept: */* Host: localhost === Response Test 1: HTTP/1.1 501 Method Not Implemented Date: Sun, 15 May 2011 17:01:26 GMT Server: Apache Allow: GET,HEAD,POST,OPTIONS Content-Length: 206 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>501 Method Not Implemented</title> </head><body> <h1>Method Not Implemented</h1> <p>NONE to / not supported.<br /> </p> </body></html> Connection closed by foreign host. === Test 3 === OK ============================================ RewriteCond %{THE_REQUEST} !^(HEAD|POST|GET) RewriteRule (.*) - [L] # Should not come here RewriteRule ^/ http://test.localhost/?method=%{REQUEST_METHOD} [R=302,L] === Request Test 3: NONE / HTTP/1.0 Accept: */* Host: localhost === Response Test 3: HTTP/1.1 501 Method Not Implemented Date: Sun, 15 May 2011 16:53:08 GMT Server: Apache Allow: GET,HEAD,POST,OPTIONS Content-Length: 206 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>501 Method Not Implemented</title> </head><body> <h1>Method Not Implemented</h1> <p>NONE to / not supported.<br /> </p> </body></html> ============================================ The combination of ErrorDocument & mod_rewrite causes this strange effect... (¿?) Is a bug? or... there is a standard/workarround way for both to coexist? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
