git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] http: add custom hostname to IP address resolutions

From
Junio C Hamano <gitster@pobox.com>
Date
May 12, 2022, 16:22 UTC
Message-ID
<xmqqzgjmg1q5.fsf@gitster.g>
In-Reply-To
<CAP8UFD3UvjJzEQApiCKSknDWaTjbEMKkr17j1QN-8gwz7eWV3Q@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 8 quoted lines
> "Perhaps invent a totally bogus domain name, map that to
> localhost ::1, run a test server locally, and try to clone from that
> bogus domain?"
>
> (See: https://lore.kernel.org/git/xmqqfslrycvp.fsf@gitster.g/)
>
> I think "a totally bogus domain name" refers to something other than
> "example.com".

I meant a domain that should not be used for purposes other than being examples in the real world, including "example.com".

But RFC6761, which is an update to RFC2606, describes a set of properties that make .invalid nice domain to use, including:

 1.  Users are free to use "invalid" names as they would any other
     domain names.  Users MAY assume that queries for "invalid"
     names will always return NXDOMAIN responses.
 3.  Name resolution APIs and libraries SHOULD recognize "invalid"
     names as special and SHOULD always return immediate negative
     responses.  Name resolution APIs SHOULD NOT send queries for
     "invalid" names to their configured caching DNS server(s).
       
Another possibility is ".test" but it is more for testing DNS, not
application, i.e.
 1.  Users are free to use these test names as they would any other
     domain names.  However, since there is no central authority
     responsible for use of test names, users SHOULD be aware that
     these names are likely to yield different results on different
     networks.
 3.  Name resolution APIs and libraries SHOULD NOT recognize test
     names as special and SHOULD NOT treat them differently.  Name
     resolution APIs SHOULD send queries for test names to their
     configured caching DNS server(s).

so for a code like what we are discussing, which would not want the names to be shown to DNS and yield any IP address, ".test" makes a poorer "bogus domain name" than ".invalid", I think.

By the way, we seem to have references to .xz top-level domain, which appeared only in earlier drafts of what became RFC2606 (which was updated by RFC6761) in both documentation pages and tests. At some point we may want to update the former to ".example" and the latter to ".invalid" as a clean-up.

> Also "example.com" does seem to resolve to an IP address and even has
> an HTTP(S) server on it, while I think the purpose of the test would
> be to check that there is not even a valid DNS resolution when the new
> option is not used.
Yup, that makes ".invalid" a better candidate, I think.
Thanks.
Previous: Christian CouderNext: Christian Couder
Message 11 of 20 in “http: add custom hostname to IP address resolves”
  1. http: add custom hostname to IP address resolvesChristian Couder, May 2, 2022
  2. Junio C HamanoMay 2, 2022
  3. Christian CouderMay 4, 2022
  4. Junio C HamanoMay 4, 2022
  5. Christian CouderMay 5, 2022
  6. Carlo Marcelo Arenas BelónMay 5, 2022
  7. Christian CouderMay 9, 2022
  8. http: add custom hostname to IP address resolutionsChristian Couder, May 4, 2022
  9. Carlo Marcelo Arenas BelónMay 5, 2022
  10. Christian CouderMay 12, 2022
  11. Junio C HamanoMay 12, 2022
  12. Christian CouderMay 12, 2022
  13. http: add custom hostname to IP address resolutionsChristian Couder, May 9, 2022
  14. Carlo ArenasMay 10, 2022
  15. Christian CouderMay 12, 2022
  16. Carlo ArenasMay 12, 2022
  17. Patrick SteinhardtMay 12, 2022
  18. Carlo ArenasMay 12, 2022
  19. Junio C HamanoMay 12, 2022
  20. http: add custom hostname to IP address resolutionsChristian Couder, May 16, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.