dukeofharen / httplaceholder

A very flexible cross platform HTTP stub application.
MIT License
109 stars 4 forks source link

Bug/scenario state response fixes #318

Closed dukeofharen closed 1 year ago

dukeofharen commented 1 year ago

Pull request type

Please check the type of change your PR introduces:

What is the current behavior?

There is a but in the "scenario_state" and "scenario_hitcount" variable handlers. Whenever a lot of requests are fired for these scenarios, the wrong value might be written in the response.

What is the new behavior?

The scenario state is cached in the HttpContext (so on the HTTP request). This value will be used when written to the response instead of retrieving it from the scenario store (which might be an outdated or too new value).

Does this introduce a breaking change?