Unanswered question

Getting a 412 precondition failed on replay. Request header has a If-Match condition. How to solve this error?

Getting a 412 precondition failed on replay. Request header has a If-Match condition. How to solve this error?

Sh S.
Sh S.

Sh S.

Level
0
12 / 100
points

Answers

Well it depends on when you get that response code. Do you know if that request has been executed more than once in your user path? Or do you get that response code between iteration?

Also what is the HTTP method of your request? i.e is it a GET, PUT or else?

Sh S.
Sh S.

Sh S.

Level
0
12 / 100
points

The request has been executed just once in the user patch , i checked with both just one iteration & multiple iterations , the same issue of 412 status code is occurring at the exact same steps irrespective of the iteration.
It is a PUT request.

Ok so maybe the best would be to disable the cache mechanism for PUT requests. Please follow the procedure below:

  1. Stop NeoLoad
  2. Edit $install_dir/conf/controller.properties
  3. Go to the [Runtime] section and add in a new line: disable.cache.for.methods=PUT
  4. Save
  5. Start NeoLoad

If the cache headers are the root cause of your issue this procedure should fix it.