This is very strange. I set up a local web server and made sure it correctly redirected to the page specified in the "redirects" manifest entry. Still no dice.
So, hitting the "redirect" button will open up the address: http://MichaelPro.local/~mbishop/index.html curl returns this for that address… HTTP/1.1 302 Found Date: Tue, 02 Jul 2013 15:09:36 GMT Server: Apache/2.2.22 (Unix) DAV/2 mod_ssl/2.2.22 OpenSSL/0.9.8x Location: http://firefoxos.non-existent-domain-asdfg.com/authenticated.html Content-Type: text/html; charset=iso-8859-1 So, I'm expecting the app to then attempt to open http://firefoxos.non-existent-domain-asdfg.com/authenticated.html Which is listed in the manifest as: "redirects": [ {"from": "https://firefoxos.test-oauth.non-existent-domain-asdfg.com/authenticated.html", "to": "/redirects/authenticated.html"} ] And then I'm expecting the app to redirect to: /redirects/authenticated.html Instead, I get that "about:// is not loading properly" A difference this time is that the header in the app shows (pardon my ascii graphic): [x] | http://michaelpro.local So that has changed. Is there a better way for me to test this or is something really wrong? _ michael On Tuesday, July 2, 2013 at 10:17 AM, Antonio M. Amaya wrote: > The only thing I can think of is that the redirects key is only applied > when the server returns a 302 with that URI. That is, if your app loads > a server side page that returns a 302 with the controlled URL, then it > should work. Otherwise, it doesn't. > > So, in your example, it won't work (if you try to directly open the > controlled URL, it just opens it). Oh, and another thing, having inline > scripts on a privileged app should also not work, > > Best, > > Antonio > > On 02/07/2013 15:48, Michael Bishop wrote: > > I sure can. > > > > https://github.com/michaeljbishop/b2g-sample-apps/tree/master/redirects > > > > It seems a simple enough api to write to, but this little sample app seems > > to fail when the "redirects" feature is exercised. > > > > I'm curious if it only fails for me and if not, what I'm doing wrong to > > make it fail. > > > > Thank you very much for your time, > > > > _ michael > > > > > > > > On Tuesday, July 2, 2013 at 6:06 AM, Julien Wajsberg wrote: > > > > > Le 01/07/2013 22:56, Michael Bishop a écrit : > > > > > > > > > > > > Hello all, > > > > I'm sure there is something really simple that I'm missing, but I can't > > > > see it. I've made the smallest web app I can make that simply tests the > > > > "redirects" mechanism. > > > > > > > > It has one button that opens up a new window pointing directly to the > > > > landing page and one button that opens up the pseudo-domain specified > > > > by the "redirects" manifest entry. > > > > > > > > As far as I can tell, they should do exactly the same thing. However, > > > > when I go through the "redirects" mechanism, I end up with a weird > > > > error message about "about://" > > > > > > > > When I open the landing pad directly, I get this: > > > > > > > > > > > > The sample app is 3k. I've included it here. Has anyone seen this > > > > before and is there a simple fix that I'm missing? > > > > > > > > For the life of me, it looks like I'm doing the right thing… > > > > > > Hey, > > > > > > I think we missed your app :) could you please upload it on eg github ? > > > > > > -- > > > Julien > > > > > > > > > _______________________________________________ > > dev-b2g mailing list > > [email protected] (mailto:[email protected]) > > https://lists.mozilla.org/listinfo/dev-b2g > > > > > > ________________________________ > > Este mensaje se dirige exclusivamente a su destinatario. Puede consultar > nuestra política de envío y recepción de correo electrónico en el enlace > situado más abajo. > This message is intended exclusively for its addressee. We only send and > receive email on the basis of the terms set out at: > http://www.tid.es/ES/PAGINAS/disclaimer.aspx > _______________________________________________ > dev-b2g mailing list > [email protected] (mailto:[email protected]) > https://lists.mozilla.org/listinfo/dev-b2g > > _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
