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.

Comments

damien tournoud’s picture

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".

adminfor@inforo.com.ar’s picture

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

adminfor@inforo.com.ar’s picture

Title: Prevent 406 response pages to be cached » mod_sec returns 406 then Drupal cache a 404
damien tournoud’s picture

Category: bug » support
Priority: Critical » Normal

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

adminfor@inforo.com.ar’s picture

Category: support » bug
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.

damien tournoud’s picture

I meant Apache' ErrorDocument directive.

adminfor@inforo.com.ar’s picture

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

adminfor@inforo.com.ar’s picture

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

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Considering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.