Projet

Général

Profil

Bug #10813

get_variadic_url supprime le / final dans une URL

Ajouté par Thomas Noël il y a presque 8 ans. Mis à jour il y a presque 8 ans.

Statut:
Fermé
Priorité:
Haut
Assigné à:
Version cible:
Début:
03 mai 2016
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

L'ajout de ce test plante :

     assert get_variadic_url('[url]foobar/',
            {'url': 'http://www.example.net/'}) == 'http://www.example.net/foobar/'

Le plantage :

E       assert 'http://www.e...le.net/foobar' == 'http://www.ex...e.net/foobar/'
E         - http://www.example.net/foobar
E         + http://www.example.net/foobar/
E         ?                              +


Fichiers

Révisions associées

Révision 89924c19 (diff)
Ajouté par Thomas Noël il y a presque 8 ans

misc: support variadic URL with trailing / (#10813)

Historique

#1

Mis à jour par Thomas Noël il y a presque 8 ans

Alors que celui-ci passe :

    assert get_variadic_url('[url]foo/bar/',
            {'url': 'http://www.example.net/'}) == 'http://www.example.net/foo/bar/'

(juste ajout d'un / entre foo et bar)

#2

Mis à jour par Thomas Noël il y a presque 8 ans

Pas super évident, voilà où j'en suis dans ma compréhension.

À noter un path.count('/')>=2 qui semblait complètement étrange, remplacé par count('//')==1

(note: ça me gène sur de nouveaux appels webservices famille que je voudrais faire à Alfortville)

#4

Mis à jour par Thomas Noël il y a presque 8 ans

  • Statut changé de En cours à Résolu (à déployer)

Yep, mieux, merci. Je pousse ainsi.

commit 89924c19402073f7eb1aac3c0e7ddc48391ff27f
Author: Thomas NOEL <tnoel@entrouvert.com>
Date:   Tue May 3 16:59:27 2016 +0200

    misc: support variadic URL with trailing / (#10813)

#5

Mis à jour par Thomas Noël il y a presque 8 ans

  • Version cible mis à v1.42
#6

Mis à jour par Frédéric Péters il y a presque 8 ans

  • Statut changé de Résolu (à déployer) à Fermé

Formats disponibles : Atom PDF