www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven J. Hathaway (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (INFRA-5367) Apache mirror.cgi - does not recognize Preferred mirror URL ending with slash
Date Sat, 13 Oct 2012 16:34:03 GMT

     [ https://issues.apache.org/jira/browse/INFRA-5367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Steven J. Hathaway resolved INFRA-5367.

    Resolution: Fixed

Tested a variety of ways - FIXED
Steven J. Hathaway
> Apache mirror.cgi - does not recognize Preferred mirror URL ending with slash
> -----------------------------------------------------------------------------
>                 Key: INFRA-5367
>                 URL: https://issues.apache.org/jira/browse/INFRA-5367
>             Project: Infrastructure
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Dists, Mirrors
>            Reporter: Steven J. Hathaway
>         Attachments: INFRA-5367.patch
> There is a BUG in the python script for:
>    http://www.apache.org/dyn/mirrors/mirrors.cgi
> that prevents web pages (i.e. XERCES mirror downloads) from specifying a specific mirror
from a selection of mirrors.  This issue is also common to other Apache projects.
> The problem is that the list of mirrors is populated from the database file "mirrors.list"
that have the URI's
> appended with a slash.  The python script that looks for a Preferred mirror expects the
parameter to NOT HAVE an appended slash.
> It looks like the Apache mirror.cgi python script needs to be fixed.
> This code snip shows where the '/' is being mistreated.
> Here is the snip of code from Apache dyn/mirrors/mirrors.cgi that has the issue:
>   # Check if the requested Preferred mirror is in the list
>   # Note the user-requested mirror doesn't have a trailing-slash
>   prefmir = None
>   if preferred:
>     for mir in mirrors:
>       if mir[2][:-1] == preferred:
>         prefmir = mir
>         break
>   # Otherwise pick a preferred mirror from our country
> --
> This snip is from the Xerces page that creates a form to select a preferred mirror. 
This should allow the user to select a specific mirror for downloads.  The resulting GET method
invokes the mirror.cgi with a URL that looks like:
>    "xerces.apache.org/mirrors.cgi&Preferred="the preferred mirror string/"
> Note that "the preferred mirror string/" is uri-encoded and ends with a slash.
> <p>You are currently using the <strong>[preferred]</strong> mirror.
> If you encounter a problem with this mirror, please select another mirror.
> If all mirrors are failing, there are <em>backup</em> mirrors
> (at the end of the mirrors list) that should be available.</p>
> <a name="SelectMirror"></a>
> <form action="[location]" method="get" id="SelectMirror">Other mirrors:
> <select name="Preferred">
> <!--[if-any http] [for http]--><option selected="selected"
> value="[http]">[http]</option>
> <!--[end] [end]-->
> <!--[if-any ftp] [for ftp]--><option value="[ftp]">[ftp]</option>
> <!--[end] [end]-->
> <!--[if-any backup] [for backup]--><option value="[backup]">[backup]
> (backup)</option>
> <!--[end] [end]--></select> <input value="Change" type="submit">
> </form>
> --
> Sincerely,
> Steven J. Hathaway

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message