Bug 1021481 - Handle app:// protocol for DEBUG=1

...ut port change
Yes!

-----Mensagem Original-----
De: ochameau
Enviada em: 23/06/2014 07:02
Para: mozilla-b2g/gaia
Assunto: Re: [gaia] Bug 1021481 - Handle app:// protocol for DEBUG=1 (#20654)

In tools/extensions/httpd/bootstrap.js:
 > +      QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler]),
> +      newURI: function(aSpec, aOriginCharset, aBaseURI) {
> +        let uri = Cc["@mozilla.org/network/standard-url;1"]
> +                  .createInstance(Ci.nsIStandardURL);
> +        uri.init(Ci.nsIStandardURL.URLTYPE_STANDARD, -1, aSpec, aOriginCharset,
> +                 aBaseURI);
> +        return uri.QueryInterface(Ci.nsIURI);
> +      },
> +      newChannel: function(aURI) {
> +        let url = aURI.QueryInterface(Ci.nsIURL);
> +        let appId = aURI.host;
> +        let fileSpec = url.filePath;
> +        let uri;
> +        uri = 'http://' + appId + ':' + GAIA_PORT + fileSpec;
> +        let channel = Services.io.newChannel(uri, null, null);
> +        channel.QueryInterface(Ci.nsIHttpChannel);
 
Do you really need that? If yes, can you add a comment?

—
Reply to this email directly or view it on GitHub.