Closed Bug 279158 Opened 20 years ago Closed 4 years ago

nsIDNSRecord::canonicalName should document what it does for IDN

Categories

(Core :: Networking, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: Biesinger, Assigned: sonakshisaxena1, NeedInfo)

References

()

Details

(Keywords: good-first-bug, intl, Whiteboard: [necko-backlog])

Attachments

(1 file)

52     /**
 53      * @return the canonical hostname for this record.  this value is empty if
 54      * the record was not fetched with the RESOLVE_CANONICAL_NAME flag.
 55      *
 56      * e.g., www.mozilla.org --> rheet.mozilla.org
 57      */
 58     readonly attribute ACString canonicalName;

It's unclear what will happen for IDN hostnames... probably it will return the
encoded name? (xn--...)

if it does, it would seem more useful if it returned the unicode version... but
it should at least document what it returns.
Keywords: intl
Assignee: darin → nobody
QA Contact: benc → networking
Whiteboard: [necko-backlog][good first bug]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3

Hello! May I know how can I reproduce this bug or work on this bug?

Keywords: good-first-bug
Whiteboard: [necko-backlog][good first bug] → [necko-backlog]

Hey [:valentin]
Is this bug still active?
If yes, then I would like to work on it.
Thanks!

Flags: needinfo?(valentin.gosu)

I had to check what the call actually returns, so yes, it would be nice to clarify this in the docs.

We should add a comment here:
https://searchfox.org/mozilla-central/rev/72e3388f74458d369af4f6cdbaeaacb719523b8c/netwerk/dns/nsIDNSRecord.idl#34-36

That the result, if IDN will be returned as punycode.

eg., élève.w3c-test.org --> xn--lve-6lad.w3c-test.org

Also, a test would be nice to have. Something similar to this but for IDN domains.

Assignee: nobody → sonakshisaxena1
Flags: needinfo?(valentin.gosu)

(In reply to Valentin Gosu [:valentin] (he/him) from comment #5)

Also, a test would be nice to have. Something similar to this but for IDN domains.
I read through the test that you shared, but I'm not sure if I understood it well enough. Can you point me out to a doc where I can read about the correct way to write unit tests?

Flags: needinfo?(valentin.gosu)

https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests

Here is a doc regarding the test suite.
The steps for adding a new test are:

  1. create the new file
  2. add it to xpcshell.ini
  3. write the test according to the doc - add_task(... check for things, etc.
  4. test it with ./mach test path/to/test
  5. submit patch
Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ba2c085d9dff
nsIDNSRecord::canonicalName should document what it does for IDN r=valentin

Backed out for failures on test_dns_service_wrap.js

backout: https://hg.mozilla.org/integration/autoland/rev/0cf45bcd47f5f266cae2c18ff0a13f1a366f2f00

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=xpcshell&revision=ba2c085d9dffb58aeaa8f91c29a7d8da241c45d3&selectedTaskRun=PgEakxWfQMey52DEV5GBkQ-0

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299812207&repo=autoland&lineNumber=9106

[task 2020-04-28T16:00:03.890Z] 16:00:03 INFO - TEST-START | netwerk/test/unit_ipc/test_dns_service_wrap.js
[task 2020-04-28T16:00:04.377Z] 16:00:04 WARNING - TEST-UNEXPECTED-FAIL | netwerk/test/unit_ipc/test_dns_service_wrap.js | xpcshell return code: 0
[task 2020-04-28T16:00:04.377Z] 16:00:04 INFO - TEST-INFO took 487ms
[task 2020-04-28T16:00:04.378Z] 16:00:04 INFO - >>>>>>>
[task 2020-04-28T16:00:04.378Z] 16:00:04 INFO - PID 5176 | Couldn't convert chrome URL: chrome://branding/locale/brand.properties
[task 2020-04-28T16:00:04.379Z] 16:00:04 INFO - PID 5176 | [5176, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 88
[task 2020-04-28T16:00:04.379Z] 16:00:04 INFO - PID 5176 | [5176, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 88
[task 2020-04-28T16:00:04.379Z] 16:00:04 INFO - PID 5176 | [5176, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 88
[task 2020-04-28T16:00:04.380Z] 16:00:04 INFO - PID 5176 | [5176, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 88
[task 2020-04-28T16:00:04.380Z] 16:00:04 INFO - PID 5176 | [5176, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 88
[task 2020-04-28T16:00:04.381Z] 16:00:04 INFO - PID 5176 | [5176, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 2919
[task 2020-04-28T16:00:04.381Z] 16:00:04 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)

Flags: needinfo?(sonakshisaxena1)
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f3fadee0347b
nsIDNSRecord::canonicalName should document what it does for IDN r=valentin
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: