fedora-infra / mirrormanager2

Rewrite of the MirrorManager application in Flask and SQLAlchemy
https://mirrormanager.fedoraproject.org
GNU General Public License v2.0
63 stars 46 forks source link

mirrolist: fix &redirect=1 #179

Closed adrianreber closed 8 years ago

adrianreber commented 8 years ago

The commits

ed7e45903f381a07395b7960a719934414c7c8f5 236532af7a46d50930bdc3f9c8386a063d5960cf

which were used to support the '&protocol=' option broke the mirrorlist option to answer with a HTTP redirect (302). This fixes the redirect code path to also work with the new data format returned by the mirrorlist server.

Signed-off-by: Adrian Reber adrian@lisas.de

adrianreber commented 8 years ago

Fixes #178

puiterwijk commented 8 years ago

Looks sane to me.

pypingou commented 8 years ago

Do we want to plan unit-tests for these changes?

adrianreber commented 8 years ago

How would unit-tests look like for the mirrorlist server?

Generate a small pkl, start the mirrolist server and query all possible mirrorlist/metalink combinations?

pypingou commented 8 years ago

oh shoot, missed that it was the mirrorlist, your approach seems right yes.

adrianreber commented 8 years ago

@pypingou now with a loop over all URLs

pypingou commented 8 years ago

Cool, :+1: for me :)