412 Precondition failed error

casperl - April 24, 2006 - 09:35

Hi,

I have a specific user that cannot access a Drupal site (Drupal 4.6.6 and 4.7)

"Your upgraded site looks very good, but I still can't go further than page 1, still get 412 Precondition failed."

Googling provides me this 'explanation' on Precondition failed:

http://www.checkupdown.com/status/E412.html

Your Web server thinks that the HTTP data stream sent by the client (e.g. your Web browser or our CheckUpDown robot) included a 'Precondition' specification which the server detected was not met.

At present I am stumped and I would welcome any suggestions or pointers. I have requested info on browser version, OS, Internet connection, ISP etc. from this user. Apparently it only happens with this one website (http://www.boerboel.co.za).

Update / Feedback - Precondition Failed

casperl - May 5, 2006 - 08:33

412 Precondition Failed Error in Client Browser for Drupal Site

Should anyone search (as I did, sans success) on Drupal for 'Precondition Failed' errors, here are my experiences.

A client browser (MSIE 6.x) continually produced a '412 Preconditioned Failed' error.
A second visitor to the site reported the same error.
I searched the Drupal forums without success.
I posted the error without replies.
At least one similar post existed on Drupal.org without replies.

Through a process of elimination I suspected that both the complainant PC's were infected with a form of adware.
The main indicator were links to foreign sites on the screen listing 'Precondition Failed' that were not originating from my Drupal based site.
I pointed both persons to various online virus checking facilities and in both cases the adware was removed.

Upon further investigation it turned out that the scripts loaded by the Bad-Behaviour module was (correctly) responsible for generating the '412 Precondition Failed' error message. More specifically the file bad-behaviour-banned.php produced the message.

Interestingly, according to the text in the above file, the following conditions may trigger the '412 Precondition Failed' message in addition to the usual malware such as trojans, virii, adware and spambots:

1) Conditions relating to personal or corporate firewalls
2) Conditions relating to proxy servers
3) Download accelerators

There is a specific recommendation for client PC's to experiment with different web browsers and Firefox is specifically mentioned.

The extract below is also from Bad-Behaviour:

More Information

For your reference, the conditions for access to this server are:

Robots:

  • MUST read and obey robots.txt.
  • MUST identify themselves properly; for example MUST NOT identify as Mozilla.
  • MUST NOT pretend to be a human.

Humans:

  • MUST NOT pretend to be a robot.
  • MUST NOT use a computer infected with viruses, Trojan horses or other
    malicious software.

Both:

  • MUST NOT harvest email addresses.
  • MUST NOT attempt to send spam.
  • MUST NOT attempt to compromise server security.
  • MUST NOT use excessive amounts of bandwidth or other server resources.

For the record now that I have looked at bad-behaviour in more depth I believe that as many Drupal sites as possible should install and enable this module. The risk of being content-spammed is simply to great!

Casper Labuschagne
Where am I on the Drupal map on Frapper?

Thanks for this

bomarmonk - July 6, 2006 - 19:17

Bad behavior (I believe) just did the same thing to one of my users. Your explanation was very helpful (and at least gives a possible solution). I'll post about any success at resolving the above mentioned precondition failed message by removing adware, etc. from the user's machine.

Confirming... (Precondition Failed Error)

JDSaward - August 26, 2006 - 11:28

I had the same error just now; getting the same 'Precondition Failed Error'; bad-behaviour module would not let me in to my own site to administer it!

I ran Ad-Aware and the clean-ups were acceptable to bad-behaviour and I have access again. Interesting.

John

how long to wait?

federico - August 13, 2007 - 18:23

1- I installed a feed reader add-on on Firefox.
2- That caused a "precondition failed" message on my site from my computer.
3- I uninstalled the feed reader program that was causing the problem.
4- I ran anti-spyware and antivirus and found nothing on my pc
5- I still got no access to my site. I waited half and received the same message
5- Thanks to this post, I removed the bad-behavior module using ftp.
6- Now it works

Should I stop using bad behavior module or should i wait and then reinstall the module?

 
 

Drupal is a registered trademark of Dries Buytaert.