Development #716
Find a bertter way to manage condition
Début:
06 octobre 2011
Echéance:
% réalisé:
100%
Temps estimé:
Patch proposed:
Non
Planning:
Description
The management of the condition in the mapping is not good. Find a better way to manage that.
Révisions associées
Historique
Mis à jour par Jérôme Schneider il y a plus de 12 ans
- Sujet changé de Find a bertter way to manager condition à Find a bertter way to manage condition
Mis à jour par Benjamin Dauvergne il y a plus de 12 ans
Coul you give a link to the implied source code ?
Mis à jour par Jérôme Schneider il y a plus de 12 ans
At the moment the a condition work like this :
'hook_name': [ { 'filter': mylfilter, 'values': { }, 'condition': "response.code==302" }, ]
This will call the hook like this :
myfilter(env, values, condition, request, response) Condition equal to "response.code==302" in this case.
I want to change that. I will call the hook only if the condition is True. With my initial configuration, I will call the hook only if the initial response code is equal to 302.
It will be something like :
if eval(condition): return myfilter(env, values, request, response) else: return response
Mis à jour par Jérôme Schneider il y a plus de 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit commit:02e4ff0d04df02fcf7399d1ec67023d861c9178d.
Mis à jour par Jérôme Schneider il y a plus de 9 ans
- Statut changé de Résolu (à déployer) à Fermé
- Patch proposed mis à Non
dispatcher: improved condition management and force response to be unique
Fixes #716