This repository was archived by the owner on Nov 25, 2025. It is now read-only.
Commit f1ee4ae
committed
Make
Having `DNS-error-payload` record contain a string field for `rcode`
while a `u16` field for `info-code` is surprising. If appplications
will be expected to know the IANA values of the `u16` [INFO-CODE value],
it would make sense for them to know the `u16` for the [RCODE value] too.
But if they won't, then they likely don't have any use for either `u16`
value, and just want a simple string.
I think wasi-http could plausibly go either way: Provide `u16` values
for both `rcode` and `info-code`, or neither, and instead just provide
a `string`.
In this PR, I propose to just provide a `string`. My guess is that most
applications in scope here don't need precise DNS error code
information and basically just need a way to report that "it was DNS".
And, not all host resolver libraries provide error information that
includes RCODE and INFO-CODE, for example [Rust's `ToSocketAddrs` trait]
or [POSIX `getaddrinfo`].
Fixed #184.
[RCODE value]: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
[INFO-CODE value]: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#extended-dns-error-codes
[Rust's `ToSocketAddrs` trait]: https://doc.rust-lang.org/stable/std/net/trait.ToSocketAddrs.html
[POSIX `getaddrinfo`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/freeaddrinfo.htmlDNS-error-payload just contain a string.1 parent 14a19b3 commit f1ee4ae
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
0 commit comments