Erik and Maurice. You guys are awesome. Thanks for figuring this out. I will incorporate this into the Installer app very soon.
Alex, I think we are good for now. Thanks for offering to help. Regards, Om On Fri, Oct 18, 2013 at 8:57 AM, Maurice Amsellem < maurice.amsel...@systar.com> wrote: > Didn't find anything. I give up. > > After all, we have a download code that works... > > Maurice > > -----Message d'origine----- > De : Maurice Amsellem [mailto:maurice.amsel...@systar.com] > Envoyé : vendredi 18 octobre 2013 17:40 > À : dev@flex.apache.org > Objet : RE: Installer changes to go with 4.11? > > Sorry, URLRequest is private, but URLConnection and HttpURLConnection are > available. > Looking into it now... > > Maurice > > -----Message d'origine----- > De : Maurice Amsellem [mailto:maurice.amsel...@systar.com] > Envoyé : vendredi 18 octobre 2013 17:33 > À : dev@flex.apache.org > Objet : RE: Installer changes to go with 4.11? > > When executing the ant get task in verbose mode it says the following (see > below). > So it handles the redirection properly. > > I have checked the source of Get task, it's very simple and relies > entirely on java URLConnection. > > get > Getting: > http://downloads.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Release%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%20notes%29/OSMF.swc?r=&ts=1381906346&use_mirror=optimate > > To: D:\ApacheFlex\git_source\flex-sdk\in\osmf.swc > > > http://downloads.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Release%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%20notes%29/OSMF.swc?r=&ts=1381906346&use_mirror=optimate > moved to > > http://optimate.dl.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Release%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%20notes%29/OSMF.swc > .......... > > I also tried the initial url (with use_mirror=optimate) and got the HTML > file, as usual :-( > > Obvisouly java URLConnection and Flex/Flash URLRequest do not have the > same behavior... > > Difficult for me to investigate further, as these are both "system" > classes with non-open source code... > > Maurice > > -----Message d'origine----- > De : Alex Harui [mailto:aha...@adobe.com] Envoyé : vendredi 18 octobre > 2013 17:12 À : dev@flex.apache.org Objet : Re: Installer changes to go > with 4.11? > > Sounds like you have something to try, so I'm not going to investigate. > Let me know if that's not true. > > -Alex > > On 10/18/13 7:51 AM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote: > > >On Oct 18, 2013 1:31 AM, "Erik de Bruin" <e...@ixsoftware.nl> wrote: > >> > >> Funny thing is these URLs succeed when used with the ant 'get' task. > >> I recently put the one I posted before in 'downloads.xml' to fix an > >> issue with the previous URL and it has been working fine since... > >> > >> EdB > >> > > > >That is what I was wondering as well. It is possible that the same > >html file is being downloaded as swc file. Can you open the file as a > >zip file? > > > >Thanks, > >Om > > > >> > >> > >> On Fri, Oct 18, 2013 at 10:25 AM, Maurice Amsellem > >> <maurice.amsel...@systar.com> wrote: > >> >>The AIR app will actually follow the redirect. But it looks like > >> >>on > >the first hit they are setting a cookie and looking for the cookie > >before downloading the >real file. If not, they simply redirect to the > >downloads page for a five second wait. And they do it because they > >want to show ads apparently [1] > >> > > >> > You are right. > >> > > >> > So I disabled cookies and javascript , erased all my cookies and > >history in chrome, and run one of the URLs, and the download was > >successful. > >> > I inspected the OSMF.swc request, it has no cookies. > >> > > >> > So I suspect it has something to do with the ;ts=1382081780 that is > >> > in > >the URL. > >> > That's obviously a timestamp in 100th of seconds. > >> > So maybe the server is doing some check or something on this value, > >>and > >fails if does not math an expected range, > >> > So that people cannot use an old link to download. > >> > > >> > Or probably not, I don't know... > >> > > >> > Maurice > >> > > >> > > >> > -----Message d'origine----- > >> > De : omup...@gmail.com [mailto:omup...@gmail.com] De la part de > >OmPrakash Muppirala > >> > Envoyé : vendredi 18 octobre 2013 09:49 À : dev@flex.apache.org > >> > Objet : Re: Installer changes to go with 4.11? > >> > > >> > On Fri, Oct 18, 2013 at 12:40 AM, Maurice Amsellem < > >maurice.amsel...@systar.com> wrote: > >> > > >> >> Hi, maybe that's obvious , as I am not an HTTP expert at all, > >> >> > >> >> but the HTML content returned has a meta http-equiv "refresh", > >> >> that reloads the pages 5 seconds later with the mirror URL (see > >> >> below) > >> >> > >> >> So it's not doing redirect. > >> >> > >> >> Maybe we could parse the content and grab that URL, then send > >> >> another download? > >> >> > >> >> WDYT ? > >> >> > >> >> > >> >> > >> > I did try exactly that. But the meta redirect url first goes to > >> > the > >sourceforge.net page before it gets redirected again. The AIR app will > >actually follow the redirect. But it looks like on the first hit they > >are setting a cookie and looking for the cookie before downloading the > >real file. If not, they simply redirect to the downloads page for a > >five second wait. And they do it because they want to show ads > >apparently [1] > >> > > >> > [1] http://sourceforge.net/apps/trac/sourceforge/ticket/23335 > >> > > >> > > >> > > >> >> <meta http-equiv="refresh" content="5; url= > >> >> > >>http://downloads.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Relea > >> >> > >>se%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%2 > >> >> > >>0notes%29/OSMF.swc?r=app%3A%2FFlexAIRsandbox.swf&ts=1382081780& > >> >> ;use_mirror=freefr > >> >> "> > >> >> > >> >> -----Message d'origine----- > >> >> De : omup...@gmail.com [mailto:omup...@gmail.com] De la part de > >> >> OmPrakash Muppirala Envoyé : vendredi 18 octobre 2013 09:31 À : > >> >> dev@flex.apache.org Objet : Re: Installer changes to go with 4.11? > >> >> > >> >> You are probably correct, but every 'direct link' I tried seems to > >> >> redirect to the same page which redirects to the actual mirror. > >> >> In fact the link I am using was a 'direct link' to a mirror site. > >> >> > >> >> I am not sure if the downloads.xml link is correct either. > >> >> > >> >> Thanks, > >> >> Om > >> >> > >> >> > >> >> On Fri, Oct 18, 2013 at 12:19 AM, Alex Harui <aha...@adobe.com> > >>wrote: > >> >> > >> >> > OK, will look tomorrow. I thought this kind of URL always > >> >> > returns an HTML page with a separate link to the mirror's url. > >> >> > I think in some of our scripts I bake in some mirror's URL, > >> >> > which probably isn't the "best" thing in the world to do, but > seems to work. > >> >> > > >> >> > -Alex > >> >> > > >> >> > On 10/17/13 11:52 PM, "OmPrakash Muppirala" > >> >> > <bigosma...@gmail.com> > >> >> wrote: > >> >> > > >> >> > >Sure. Here it is: > >> >> > > > >> >> > >Notice that in the handleDownloadSuccess method, the file turns > >>out > >> >> > >to be an html page. > >> >> > > > >> >> > ><?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication > >> >> > >xmlns:fx="http://ns.adobe.com/mxml/2009" > >> >> > > xmlns:s="library://ns.adobe.com/flex/spark > " > >> >> > > xmlns:mx="library://ns.adobe.com/flex/mx"> > >> >> > > <fx:Script> > >> >> > > <![CDATA[ > >> >> > > > >> >> > > protected function handleDownloadBtnClick():void > >> >> > > { > >> >> > > download(" > >> >> > > > >> >> > > >>http://switch.dl.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Rel > >> >> > ea > >> >> > se%2 > >> >> > > >>>0%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%20 > >> >> > >no > >> >> > >tes%2 > >> >> > >9/OSMF.swc > >> >> > >", > >> >> > > handleDownloadSuccess,handleDownloadError); > >> >> > > } > >> >> > > > >> >> > > private function download(url:String, > >> >> > >handlerFunction:Function, errorFunction:Function = null):void { > >> >> > > var loader:URLLoader = new URLLoader(); > >> >> > > var req:URLRequest = new URLRequest(url); > >> >> > > //Wait for 5 minutes before aborting download > >attempt. > >> >> > >Adobe download sites as well as some Apache mirrors are > >> >> > >extremely > >slow. > >> >> > > req.idleTimeout = 300000; > >> >> > > > >> >> > > loader.dataFormat = URLLoaderDataFormat.BINARY; > >> >> > > loader.addEventListener(Event.COMPLETE, > >> >> > >handlerFunction, false, 0, true); > >> >> > > > >> >> > > if (errorFunction != null) { > >> >> > > loader.addEventListener(ErrorEvent.ERROR, > >> >> > >errorFunction, false, 0, true); > >> >> > > > >> >> > >loader.addEventListener(IOErrorEvent.IO_ERROR, > >> >> > >errorFunction, false, 0, true); > >> >> > > } > >> >> > > > >> >> > > loader.load(req); > >> >> > > } > >> >> > > > >> >> > > protected function > >handleDownloadSuccess(event:Event):void > >> >> > > { > >> >> > > var data:ByteArray = event.target.data > >> >> > > var str:String = data.readUTFBytes(data.length); > >> >> > > } > >> >> > > > >> >> > > protected function > >>handleDownloadError(event:Event):void > >> >> > > { > >> >> > > trace(); > >> >> > > } > >> >> > > > >> >> > > > >> >> > > ]]> > >> >> > > </fx:Script> > >> >> > > <s:Button verticalCenter="0" horizontalCenter="0" > >> >> > >label="Download OSMF swc" click="handleDownloadBtnClick()" /> > >> >> > ></s:WindowedApplication> > >> >> > > > >> >> > > > >> >> > > > >> >> > >On Thu, Oct 17, 2013 at 10:30 PM, Alex Harui <aha...@adobe.com> > >wrote: > >> >> > > > >> >> > >> Can you carve out a 10-line MXML file that tests this > >> >> > >>download capability and post it in this thread? It would > >> >> > >>make it easier for folks to play around with potential > solutions. > >> >> > >> > >> >> > >> -Alex > >> >> > >> > >> >> > >> On 10/17/13 4:31 PM, "OmPrakash Muppirala" > >><bigosma...@gmail.com> > >> >> > wrote: > >> >> > >> > >> >> > >> >Okay, I give up. There is absolutely no way to download the > >> >> > >> >osmf.swc > >> >> > >>2.0 > >> >> > >> >file from sourceforge from the Installer. If anyone can > >> >> > >> >take a look, > >> >> > >>that > >> >> > >> >would be great. If not, I think we should just instruct > >> >> > >> >folks on how > >> >> > >>to > >> >> > >> >replace it manually. > >> >> > >> > > >> >> > >> >Thoughts? > >> >> > >> > > >> >> > >> >Thanks, > >> >> > >> >Om > >> >> > >> > > >> >> > >> > > >> >> > >> >On Thu, Oct 17, 2013 at 3:04 PM, OmPrakash Muppirala > >> >> > >> ><bigosma...@gmail.com>wrote: > >> >> > >> > > >> >> > >> >> Just to confirm, osmf.swf should really be named > >> >> > >> >> osmf_<flexversion>_<buildnumber>.swf, right? > >> >> > >> >> > >> >> > >> >> Thanks, > >> >> > >> >> Om > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> On Thu, Oct 17, 2013 at 11:54 AM, OmPrakash Muppirala < > >> >> > >> >> bigosma...@gmail.com> wrote: > >> >> > >> >> > >> >> > >> >>> On Thu, Oct 17, 2013 at 11:50 AM, Maurice Amsellem < > >> >> > >> >>> maurice.amsel...@systar.com> wrote: > >> >> > >> >>> > >> >> > >> >>>> I have tested the download from France. > >> >> > >> >>>> It's almost instantaneous on a regular ADSL connection > >> >> > >> >>>>via wifi, which is not surprising, given the small size > >> >> > >> >>>>of the file. > >> >> > >> >>>> > >> >> > >> >>>> > >> >> > >> >>>> > >> >> > >> >>> It is, for me as well. > >> >> > >> >>> > >> >> > >> >>> > >> >> > >> >>>> Where is this mirror located? > >> >> > >> >>>> > >> >> > >> >>>> > >> >> > >> >>> Looks like it is in Zurich, Switzerland. > >> >> > >> >>> > >> >> > >> >>> > >> >> > >> >>> > >> >> > >> >>>> Maurice > >> >> > >> >>>> > >> >> > >> >>>> -----Message d'origine----- De : omup...@gmail.com > >> >> > >> >>>> [mailto:omup...@gmail.com] De la > >>part > >> >> > >> >>>> de OmPrakash Muppirala Envoyé : jeudi 17 octobre 2013 > >> >> > >> >>>> 20:15 À > >> >> > >> >>>> : dev@flex.apache.org Objet : Re: Installer changes to > >> >> > >> >>>> go with 4.11? > >> >> > >> >>>> > >> >> > >> >>>> The most straightforward way to solve this problem seems > >> >> > >> >>>>to be > >> >> > >> >>>>- grabbing the osmf.swc from a single mirror directly > >> >> > >> >>>>like this [1] Here is a short documentation on > >> >> > >> >>>>sourceforge's mirroring system. Any > >> >> > >>concerns? > >> >> > >> >>>> Any alternative ideas? > >> >> > >> >>>> > >> >> > >> >>>> Thanks, > >> >> > >> >>>> Om > >> >> > >> >>>> > >> >> > >> >>>> [1] > >> >> > >> >>>> > >> >> > >> >>>> > >> >> > >> >>>> > >> >> > >> > >>http://switch.dl.sourceforge.net/project/osmf.adobe/OSMF%202.0%20 > >> >> > >> Re > >> >> > >> leas > >> >> > >> > >> >> > > >>>>>>>>e%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20re > >> >> > >>>>>>le > >> >> > >>>>>>ase%2 > >> >> > >>>>>>0n > >> >> > >> >>>>otes%29/OSMF.swc > >> >> > >> >>>> > >> >> > >> >>>> [2] > >> >> > >> >>>> http://sourceforge.net/apps/trac/sourceforge/wiki/Mirror > >> >> > >> >>>> s > >> >> > >> >>>> > >> >> > >> >>>> > >> >> > >> >>>> On Thu, Oct 17, 2013 at 10:32 AM, OmPrakash Muppirala > >> >> > >> >>>> <bigosma...@gmail.com>wrote: > >> >> > >> >>>> > >> >> > >> >>>> > The problem with this download page is that it does a > >> >> > >> >>>> > 307 > >> >> > >>redirect > >> >> > >> >>>>to > >> >> > >> >>>> > the actual file. Flex/AIR does not seem to follow the > >> >> > >> >>>> > redirect, > >> >> > >> >>>>even > >> >> > >> >>>> > though I set URLRequest.followRedirects = true. > >> >> > >> >>>> > > >> >> > >> >>>> > Alex/others, do you know of any other location to > >>download > >> >> > >> >>>> > the > >> >> > >> >>>>latest > >> >> > >> >>>> > osmf.swc file. We are getting the older version from > >>here > >> >> > >> >>>> > [1] > >> >> > >> >>>> > > >> >> > >> >>>> > Thanks, > >> >> > >> >>>> > Om > >> >> > >> >>>> > > >> >> > >> >>>> > [1] > >> >> > >> >>>> > > >> >> > >> > >> >> > >>>>>> > >> >> > > >>http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/fra > >> >> > m > >> >> > >>>>>>e > >> >> > >> >>>> > works/libs/ > >> >> > >> >>>> > > >> >> > >> >>>> > > >> >> > >> >>>> > On Thu, Oct 17, 2013 at 3:32 AM, Erik de Bruin > >> >> > >><e...@ixsoftware.nl> > >> >> > >> >>>> wrote: > >> >> > >> >>>> > > >> >> > >> >>>> >> Om, > >> >> > >> >>>> >> > >> >> > >> >>>> >> Instead of: > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> > >> >> > >>>>>> > >> >> > > >>http://sourceforge.net/projects/osmf.adobe/files/OSMF%202.0%20Releas > >> >> > e > >> >> > >> >>>> >> > >> >> > >> > >> >> > > >>>>>>>>%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20rel > >> >> > >>>>>>ea > >> >> > >>>>>>se%20 > >> >> > >> >>>> >> > >> >> > >> > >> >> > > >>>>>>>>notes%29/OSMF.swc/download?use_mirror=hivelocity&r=&use_mirror > >> >> > >>>>>>=h > >> >> > >>>>>>ivelo > >> >> > >> >>>> >> city > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> > >> >> > >>>>>> > >> >> > > >>http://sourceforge.net/projects/osmf.adobe/files/OSMF%202.0%20Releas > >> >> > e > >> >> > >> >>>> >> > >> >> > >> > >> >> > > >>>>>>>>%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20rel > >> >> > >>>>>>ea > >> >> > >>>>>>se%20 > >> >> > >> >>>> >> notes%29/OSMF.swc/download > >> >> > >> >>>> >> > >> >> > >> >>>> >> You might consider using: > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> > >> >> > >>>>>> > >> >> > > >>http://downloads.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Rel > >> >> > e > >> >> > >> >>>> >> > >> >> > >> > >> >> > > >>>>>>>>ase%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20 > >> >> > >>>>>>re > >> >> > >>>>>>lease > >> >> > >> >>>> >> > >> >> > >> > >> >> > > >>>>>>>>%20notes%29/OSMF.swc?r=&ts=1381906346&use_mirror=optim > >> >> > >>>>>>at > >> >> > >>>>>>e<htt > >> >> > >> >>>> >> > >> >> > >> > >> >> > >>>>>>p:// > >> >> > downloads.sourceforge.net/project/osmf.adobe/OSMF%202.0%20Releas > >> >> > e > >> >> > >> >>>> >> > >> >> > >> > >> >> > > >>>>>>>>%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20rel > >> >> > >>>>>>ea > >> >> > >>>>>>se%20 > >> >> > >> >>>> >> notes%29/OSMF.swc?r=&ts=1381906346&use_mirror=optimat > >> >> > >> >>>> >> e> > >> >> > >> >>>> >> > >> >> > >> >>>> >> HTH, > >> >> > >> >>>> >> > >> >> > >> >>>> >> EdB > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> On Thu, Oct 17, 2013 at 12:06 PM, OmPrakash Muppirala > >> >> > >> >>>> >> <bigosma...@gmail.com> wrote: > >> >> > >> >>>> >> > I have checked in all the fixes to support OSMF 2.0 > >>and > >> >> > >>OSMF.swf > >> >> > >> >>>> RSL. > >> >> > >> >>>> >> > There seems to be a problem with the OSMF.swc 2.0 url. > >> >> > >> >>>> >> > Can > >> >> > >> >>>>someone > >> >> > >> >>>> >> take a > >> >> > >> >>>> >> > look? > >> >> > >> >>>> >> > > >> >> > >> >>>> >> > Its 3AM here in the bay area. I am calling it a > >>night. > >> >> > >> >>>> >> > > >> >> > >> >>>> >> > Can someone take care of putting up the RC1 > >> >> > >> >>>> >> > (windows, mac and > >> >> > >> >>>>linux > >> >> > >> >>>> >> > versions) of Installer 2.7.0? > >> >> > >> >>>> >> > > >> >> > >> >>>> >> > If not, I will take it up in the morning. > >> >> > >> >>>> >> > > >> >> > >> >>>> >> > Thanks, > >> >> > >> >>>> >> > Om > >> >> > >> >>>> >> > > >> >> > >> >>>> >> > > >> >> > >> >>>> >> > On Wed, Oct 16, 2013 at 9:40 PM, OmPrakash > >> >> > >> >>>> >> > Muppirala > >> >> > >> >>>> >> > <bigosma...@gmail.com>wrote: > >> >> > >> >>>> >> > > >> >> > >> >>>> >> >> > >> >> > >> >>>> >> >> On Oct 16, 2013 8:58 PM, "Justin Mclean" > >> >> > >> >>>> >> >> <jus...@classsoftware.com> > >> >> > >> >>>> >> wrote: > >> >> > >> >>>> >> >> > > >> >> > >> >>>> >> >> > Hi, > >> >> > >> >>>> >> >> > > >> >> > >> >>>> >> >> > > Should the installer learn how to pull and > >>rename > >> >> > >> >>>> >> >> > > the > >> >> > >>SWF > >> >> > >> >>>> >> >> > > from > >> >> > >> >>>> >> the SWC > >> >> > >> >>>> >> >> > That would fix the current issue with the > >>installer. > >> >> > >> >>>> >> >> > >> >> > >> >>>> >> >> I am on it. > >> >> > >> >>>> >> >> > >> >> > >> >>>> >> >> Om > >> >> > >> >>>> >> >> > >> >> > >> >>>> >> >> > > >> >> > >> >>>> >> >> > BTW not too many people are likely to run into > >> >> > >> >>>> >> >> > this and > >> >> > >> >>>>there's > >> >> > >> >>>> >> >> > an > >> >> > >> >>>> >> easy > >> >> > >> >>>> >> >> work around eg put the file in the right place > >yourself. > >> >> > >> >>>> >> >> > > >> >> > >> >>>> >> >> > > or should the build script do that and leave > >> >> > >> >>>> >> >> > > the > >> >> > >>OSMF.SWF in > >> >> > >> >>>> >> >> > > the > >> >> > >> >>>> >> RSLs > >> >> > >> >>>> >> >> folder with the rest of > >> >> > >> >>>> >> >> > > the SDK RSL SWFs? > >> >> > >> >>>> >> >> > License wise we can't distribute the binary > >> >> > >> >>>> >> >> > release with > >> >> > >>osmf > >> >> > >> >>>>in > >> >> > >> >>>> >> >> > it > >> >> > >> >>>> >> so > >> >> > >> >>>> >> >> that complicates things a little. > >> >> > >> >>>> >> >> > > >> >> > >> >>>> >> >> > Thanks, > >> >> > >> >>>> >> >> > Justin > >> >> > >> >>>> >> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> > >> >> > >> >>>> >> -- > >> >> > >> >>>> >> Ix Multimedia Software > >> >> > >> >>>> >> > >> >> > >> >>>> >> Jan Luykenstraat 27 > >> >> > >> >>>> >> 3521 VB Utrecht > >> >> > >> >>>> >> > >> >> > >> >>>> >> T. 06-51952295 > >> >> > >> >>>> >> I. www.ixsoftware.n > >> >> > >> >>>> >> > >> >> > >> >>>> > > >> >> > >> >>>> > > >> >> > >> >>>> > >> >> > >> >>> > >> >> > >> >>> > >> >> > >> >> > >> >> > >> > >> >> > >> > >> >> > > >> >> > > >> >> > >> > >> > >> > >> -- > >> Ix Multimedia Software > >> > >> Jan Luykenstraat 27 > >> 3521 VB Utrecht > >> > >> T. 06-51952295 > >> I. www.ixsoftware.nl > >