Ask Your Question

412 - Precondition set by the client failed

asked 2015-11-05 15:35:43 -0600

updated 2015-11-12 09:51:10 -0600

412 - Precondition set by the client failed when evaluated on the Web server. The request was not completed due to preconditions that are set in the request header. Preconditions prevent the requested method from being applied to a resource other than the one intended. An example of a precondition is testing for expired content in the page cache of the client.

What exactly does this mean?

Also, does anyone here have any experience setting this up with PHP or have any resources that would be helpful? I am having no luck finding anything of the sort.


edit retag flag offensive close merge delete


What does your HTTP call that generates this message look like?

mdean gravatar imagemdean ( 2015-11-05 15:54:06 -0600 )edit

Something like that for example. I've tried adding params to the URL as well. Just trying to access the data from the browser

dlallone gravatar imagedlallone ( 2015-11-06 08:51:31 -0600 )edit

You have to login to the server before running any transactions.

mdean gravatar imagemdean ( 2015-11-06 08:58:02 -0600 )edit

I did login first

dlallone gravatar imagedlallone ( 2015-11-06 09:01:46 -0600 )edit

Im just trying to figure out why my script works on one rets server and not this one, that's all -- The logging in part, that is.

dlallone gravatar imagedlallone ( 2015-11-06 09:20:20 -0600 )edit

We'll need to see your HTTP conversation (via Fiddler or Charles, for example). If you have a small code snippet that demonstrates the problem, that would also be useful.

mdean gravatar imagemdean ( 2015-11-06 10:12:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-05 15:54:00 -0600

updated 2015-11-12 12:18:07 -0600

In answer to one part of your question...

You might be interested in the following projects for PHP support:

Concerning the 412 error. This error is only sent by transactions other than login when it doesn't have a valid session. This could be caused by a missing or corrupt "RETS-Session-ID=" cookie or if the session referred to by that cookie is expired or is not found. The login request returns the "RETS-Session-ID=" cookie on successful login and it should be returned with any subsequent transactions.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-11-05 15:35:43 -0600

Seen: 10,563 times

Last updated: Nov 12 '15