Projet

Général

Profil

Development #716

Find a bertter way to manage condition

Ajouté par Jérôme Schneider il y a plus de 12 ans. Mis à jour il y a plus de 9 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Catégorie:
-
Version cible:
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

Révision 02e4ff0d (diff)
Ajouté par Jérôme Schneider il y a plus de 9 ans

dispatcher: improved condition management and force response to be unique

Fixes #716

Historique

#1

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
#2

Mis à jour par Benjamin Dauvergne il y a plus de 12 ans

Coul you give a link to the implied source code ?

#3

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
#4

Mis à jour par Benjamin Dauvergne il y a plus de 12 ans

  • Version cible Futur supprimé
#5

Mis à jour par Jérôme Schneider il y a environ 12 ans

  • Version cible mis à 1.0
#6

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.

#7

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

Formats disponibles : Atom PDF