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) |
Jump to:
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
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
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
#4
You should remove your custom error handler (at least for 406 pages). Requalifying this as a support request.
#5
Thank your Damien. Do you mean in Drupal "error-reporting" settings or apache ErrorDocument? In Drupal there is only 403 or 404.
#6
I meant Apache' ErrorDocument directive.
#7
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
For the meanwhile, I have turned off modsec because is not possible to avoid impact Drupal's cache