Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-743

Add support for IDNA 2008 (RFC 5891)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.0
    • 5.3-alpha1
    • None
    • Android SDK 30

    Description

      The tests have been conducted with Kotlin on Android SDK 30 with Apache HttpClient Android extensions which ships with HttpClient version 5.0.1 but any HttpClient component on any platform may be impacted.

      Before making an HTTP query the client should convert the URL domain to A-label as described in RFC 5891.

      Here is an example with the trustworthy ICU4J library:
       

      int flags = IDNA.CHECK_BIDI
             | IDNA.CHECK_CONTEXTJ
             | IDNA.CHECK_CONTEXTO
             |  IDNA.NONTRANSITIONAL_TO_ASCII
             | IDNA.USE_STD3_RULES;
      IDNA idna = IDNA.getUTS46Instance(flags);
      IDNA.Info info = new IDNA.Info();
      String domainAscii = idna.nameToASCII(domain, new StringBuilder(), info);
      // check error with info.hasErrors() 

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            j-bernard Julien Bernard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h