Skip to content

[WebExtension port] URI class, DomainUtils, PSL #894

Description

@myrdd

task list

  • change the *Request class constructors
  • use … only in the xpcom build
  • remove unused functions
    • RequestService.getContentPolicyType (?)
  • nsIURI -> Uri class
    • preparations
      • No longer differentiate between "host === null" and "host === undefined" [A.2]
      • "Request": take a string, not a nsIUri object
    • get replacement for nsIURI WIP
    • nsIURI → Uri class
  • hostname services
    • nsIEffectiveTLDService → node package psl WIP
    • nsIIDNService.convertToDisplayIDN() -> rp.services.idn [A.1]
  • … (?)

details

A.1

  • convertToDisplayIDN() is the only nsIIDNService function used
  • it's used by…
    • DomainUtils.getBaseDomain()
    • OldRules class
  • the ASCII <-> UTF-8 conversion will be done by node package punycode
  • the decision whether punycode or IDN (ascii or unicode) is to be displayed for a specific domain (or domain label) depends on an eTLD check: «If a TLD is in the whitelist, we unconditionally display Unicode.» [1]

A.2

  • Three possibilities:
    • "normal-host.com"
    • "" (empty host, e.g. "file:///")
    • null/undefined (e.g. "about:config")

links

[1] https://wiki.mozilla.org/IDN_Display_Algorithm

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions