You are viewing a plain text version of this content. The canonical link for it is here.
Posted to infrastructure-issues@apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/09/02 15:53:45 UTC

[jira] [Commented] (INFRA-10237) closer.cgi JSON response missing path_info data

    [ https://issues.apache.org/jira/browse/INFRA-10237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14727366#comment-14727366 ] 

Sebb commented on INFRA-10237:
------------------------------

This field used to be in the output generated by the previous version of the script, for example:

{
    "backup": [
        "http://www.eu.apache.org/dist/", 
        "http://www.us.apache.org/dist/"
    ], 
    "ftp": [
        "ftp://ftp.mirrorservice.org/sites/ftp.apache.org/"
    ], 
    "http": [
        "http://mirror.catn.com/pub/apache/", 
        "http://www.mirrorservice.org/sites/ftp.apache.org/", 
        "http://apache.mirror.anlx.net/", 
        "http://mirror.vorboss.net/apache/", 
        "http://mirror.ox.ac.uk/sites/rsync.apache.org/", 
        "http://mirrors.muzzy.org.uk/apache/", 
        "http://mirrors.ukfast.co.uk/sites/ftp.apache.org/"
    ], 
    "location": "/dyn/closer.cgi", 
    "path_info": "lucene/solr/4.2.1/solr-4.2.1.zip", 
    "preferred": "http://mirror.catn.com/pub/apache/"
}

The output from the LUA version of the script is:

{"backup":["http://www.eu.apache.org/dist/","http://www.us.apache.org/dist/"],"cca2":"uk","ftp":["ftp://ftp.mirrorservice.org/sites/ftp.apache.org/"],"http":["http://apache.mirror.anlx.net/","http://mirror.catn.com/pub/apache/","http://mirror.ox.ac.uk/sites/rsync.apache.org/","http://mirror.vorboss.net/apache/","http://mirrors.muzzy.org.uk/apache/","http://mirrors.ukfast.co.uk/sites/ftp.apache.org/","http://www.mirrorservice.org/sites/ftp.apache.org/"],"path_info":"","preferred":"http://mirror.ox.ac.uk/sites/rsync.apache.org/"}

I think the problem is that the LUA code (around line 137) checks if get.path or r.path_info exist, rather than checking if they are non-empty strings.

> closer.cgi JSON response missing path_info data
> -----------------------------------------------
>
>                 Key: INFRA-10237
>                 URL: https://issues.apache.org/jira/browse/INFRA-10237
>             Project: Infrastructure
>          Issue Type: Bug
>          Components: Mirrors
>            Reporter: Chris Beer
>
> Until a couple days ago, a request like:
> http://www.apache.org/dyn/closer.cgi/lucene/solr/4.2.1/solr-4.2.1.zip?asjson=true
> Contained an element in the JSON response like:
> path_info: "lucene/solr/4.2.1/solr-4.2.1.zip"
> (reconstructed off the top of my head, but something close to that).
> The path_info element is currently blank, which is causing us trouble when programmatically constructing appropriate mirror URLs.
> Will this element be restored, or will consumers have to construct these paths locally?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)