Return-Path:
X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org
Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 18E93DBF2
for ;
Thu, 26 Jul 2012 16:40:50 +0000 (UTC)
Received: (qmail 80106 invoked by uid 500); 26 Jul 2012 16:40:49 -0000
Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org
Received: (qmail 80055 invoked by uid 500); 26 Jul 2012 16:40:49 -0000
Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: flex-dev@incubator.apache.org
Delivered-To: mailing list flex-dev@incubator.apache.org
Received: (qmail 80047 invoked by uid 99); 26 Jul 2012 16:40:49 -0000
Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2012 16:40:49 +0000
X-ASF-Spam-Status: No, hits=1.5 required=5.0
tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: domain of srbharathee@gmail.com
designates 209.85.212.47 as permitted sender)
Received: from [209.85.212.47] (HELO mail-vb0-f47.google.com) (209.85.212.47)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2012 16:40:42 +0000
Received: by vbbfr13 with SMTP id fr13so1806070vbb.6
for ;
Thu, 26 Jul 2012 09:40:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=TulAuI3CWqYjNVDgH+M+TpuP+sPvHtUqT8zCzetr0QM=;
b=NRkziU024hzTXBWx5LMMMJlMEl7W1NdQO0+/XjMeqlGoT3rkUGyqmtFYsfuONbOHg3
AuLhr/SdYA3Xe+ej6v/7mtuBRNo5O3Kusga5Gn4gBoUedWVyJkBelKNfeh8Mbdj79WNb
HsUmC3hSFF04iS8+0IShk6mCLf5CmvTr5VwGA7VA++wbF2ObJ91mQqfCCKUL/vSSupWE
HMGJWzhqRwVmsCpGazMUTkB+yzPu+dYTmFLb+ohANO8+1WCK1U7C3g1MoT7Gb9kFqivF
thNnMjXESdbs4b4FGAKAFcAzmWe94a+tpPKZbU/WLLT/ZrBjbmwRC7mdYvJc5mFDTx/q
Ocow==
MIME-Version: 1.0
Received: by 10.52.180.230 with SMTP id dr6mr19499324vdc.130.1343320821638;
Thu, 26 Jul 2012 09:40:21 -0700 (PDT)
Received: by 10.52.113.228 with HTTP; Thu, 26 Jul 2012 09:40:21 -0700 (PDT)
In-Reply-To:
References: <20120726160444.GA8190@tarsus.local2>
Date: Fri, 27 Jul 2012 00:40:21 +0800
Message-ID:
Subject: Re: updating ApacheFlexSDK URL in Om's installer
From: Ravindra Bharathi
To: flex-dev@incubator.apache.org
Content-Type: multipart/alternative; boundary=bcaec51a823264a70804c5be40ec
--bcaec51a823264a70804c5be40ec
Content-Type: text/plain; charset=ISO-8859-1
Could something like the below be included as part of the Flex installer
code to parse the mirror site ?
*declare the service that'll fetch the url*
http://www.apache.org/dyn/closer.cgi/incubator/flex/4.8.0-incubating/apache-flex-sdk-4.8.0-incubating-bin.zip
*Fetch the html* from
http://www.apache.org/dyn/closer.cgi/incubator/flex/4.8.0-incubating/apache-flex-sdk-4.8.0-incubating-bin.zip
(or from http://www.apache.org/dyn/closer.cgi/incubator/flex/ )
protected function getMirrorURL():void
{
// logStr +="Get Mirror Site\n";
getMirrorService.url=flex_repo;
getMirrorService.send();
}
*Parse the html to sniff out the first mirror site*
protected function getMirrorService_resultHandler(event:ResultEvent):void
{
var resultStr:String=event.result.toString();
//get to the part that says 'we suggest the following mirror site for your
download:'
var i:int=resultStr.indexOf("site for your download:
");
//get the next href link after this text
var j:int=resultStr.indexOf("",j);
var mirror_site:String=resultStr.substring(j+9,k-1);
// if you use the zip file as the url for the fetch_mirror service , split
the link into path and file
var l:int=mirror_site.lastIndexOf("/");
var fileName:String=mirror_site.substring(l+1,mirror_site.length);
var filePath:String=mirror_site.substring(0,l+1);
//set the file and path of file node with name=ApacheFlexSDK
var x:XMLList=configXML.files.file.(attribute("name")=="ApacheFlexSDK");
x.@path=filePath;
x.@file=fileName;
/*write config file back if necessary - if used as an external wrapper */
//writeConfigFile();
}
On Fri, Jul 27, 2012 at 12:09 AM, Carol Frampton wrote:
>
>
> On 7/26/12 12 :04PM, "Daniel Shahaf" wrote:
>
> >Try this link: http://www.apache.org/dyn/closer.cgi/incubator/flex/
> >
> >I'm pretty sure there is a query string parameter you can add to make it
> >do a redirect, too, rather than just tell you what the preferred mirror
> >is.
> >
> >Thanks for asking,
> >
> >Daniel
> >
> >Carol Frampton wrote on Thu, Jul 26, 2012 at 08:56:37 -0700:
> >> {sent on behalf of Erik de Bruin who is a member
> >>of flex-dev}
> >>
> >> Hi all,
> >>
> >> I'm writing on behalf of the Apache Flex (incubating) community. We're
> >> working on a tool that helps an end-user to download and install our
> >> binaries to the correct location on their system for use in an IDE.
> >>
> >> We would like to do this the proper way, which in our understanding is
> >> by using a dynamically assigned download mirror instead of a
> >> hard-coded link. I've read all of the documentation I could find and
> >> I've come up with the following solution:
> >>
> >> 1. create a wrapper around the generic 'mirrors.cgi', as described in
> >>[1];
> >> 2. create a HTML file containing only the tag: [preferred]. We need
> >> only one mirror URL as this is an automated download process;
> >> 3. place these two in the root of our project site;
> >> 4. call the wrapper CGI as a web service from our application, and use
> >> the result for the domain section of the URL.
> >>
> >> My questions:
> >> - is this a valid solution?
> >> - is there an 'easier' way to get a single dynamic mirror URL?
> >> - what did I miss, what did I forget to ask?
> >>
> >> Thank you very much for your assistance and patience,
> >>
> >> EdB
> >>
> >> [1] http://www.apache.org/dev/release-download-pages.html
> >>
> >>
> >> EdB
> >>
>
>
--bcaec51a823264a70804c5be40ec--