Re: Checking if an nsIURI came from a resource: URL

2018-12-07 Thread Henri Sivonen
On Fri, Dec 7, 2018 at 5:05 PM Dave Townsend wrote: > > This suggests that channel.originalURI should help: > https://searchfox.org/mozilla-central/source/netwerk/base/nsIChannel.idl#37 Indeed, getting both nsIURIs from the channel works. Thanks! -- Henri Sivonen hsivo...@mozilla.com _

Re: Checking if an nsIURI came from a resource: URL

2018-12-07 Thread Dave Townsend
This suggests that channel.originalURI should help: https://searchfox.org/mozilla-central/source/netwerk/base/nsIChannel.idl#37 On Fri, Dec 7, 2018 at 9:19 AM Henri Sivonen wrote: > On Fri, Dec 7, 2018 at 3:23 PM Daniel Veditz wrote: > > > > I'm afraid to ask why you want to treat these differe

Re: Checking if an nsIURI came from a resource: URL

2018-12-07 Thread Henri Sivonen
On Fri, Dec 7, 2018 at 3:23 PM Daniel Veditz wrote: > > I'm afraid to ask why you want to treat these differently. I'd like to make out resource: URLs default to UTF-8 and skip (upcoming) detection between UTF-8 and the locale-affiliated legacy encoding. > Do you have a channel or a principal?

Re: Checking if an nsIURI came from a resource: URL

2018-12-07 Thread Daniel Veditz
I'm afraid to ask why you want to treat these differently. Do you have a channel or a principal? By itself nsIURI only describes the url itself, not its effective origin nor its redirect history. On Fri, Dec 7, 2018, 8:08 AM Henri Sivonen It appears that my the time resource: URLs reach the HTML

Checking if an nsIURI came from a resource: URL

2018-12-07 Thread Henri Sivonen
It appears that my the time resource: URLs reach the HTML parser, their scheme is reported as "file" (at least in debug builds). Is there a way to tell from an nsIURI that it was expanded from a resource: URL? -- Henri Sivonen hsivo...@mozilla.com ___