mod_sec returns 406 then Drupal cache a 404

adminfor@inforo... - January 3, 2009 - 11:37
Project:Drupal
Version:5.14
Component:base system
Category:bug report
Priority:critical
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Modsec returns some 406 triggered by the usr-agent and not because of the URL being requested. This makes Drupal return (and caching) a 404 page even for existing pages. Main issue is about subsequent requests from legitimate users to those valid URLs are receiving the cached "404" pages.

#1

Damien Tournoud - January 3, 2009 - 14:42
Status:active» postponed (maintainer needs more info)

If the 406 is generated by mod_sec, Drupal probably doesn't see it, and can't do anything about it. Please elaborate on why "mod_sec returns 406 then Drupal cache a 404".

#2

adminfor@inforo... - January 3, 2009 - 20:19

I'm seeing in watchdog for each: type: "Page not found" , message: "406.shtml", severity=1 and in location the corresponding URL, existent or not.
Thanks

#3

adminfor@inforo... - January 3, 2009 - 20:20
Title:Prevent 406 response pages to be cached» mod_sec returns 406 then Drupal cache a 404

#4

Damien Tournoud - January 3, 2009 - 22:46
Category:bug report» support request
Priority:critical» normal

You should remove your custom error handler (at least for 406 pages). Requalifying this as a support request.

#5

adminfor@inforo... - January 4, 2009 - 10:21
Category:support request» bug report
Priority:normal» critical

Thank your Damien. Do you mean in Drupal "error-reporting" settings or apache ErrorDocument? In Drupal there is only 403 or 404.

#6

Damien Tournoud - January 4, 2009 - 11:38

I meant Apache' ErrorDocument directive.

#7

adminfor@inforo... - January 4, 2009 - 15:58

As far as I could see the only ErrorDocument set in my installation is in .htaccess in the form "ErrorDocument 404 /index.php".
Nothing special for 406's
thanks
Gustavo

#8

adminfor@inforo... - January 4, 2009 - 23:07

For the meanwhile, I have turned off modsec because is not possible to avoid impact Drupal's cache

 
 

Drupal is a registered trademark of Dries Buytaert.