简体   繁体   English

如果 HTTPS 服务器上的 DNS 响应 iOS 上的状态 5xx 或 4xx 会发生什么?

[英]What happens if a DNS over HTTPS server responds with status 5xx or 4xx on iOS?

Looking at this example mobileconfig , I am trying to find out what happens if a DoH server responds with a status of 4xx or 5xx in responds to a DoH query on iOS.查看此示例mobileconfig ,我试图找出如果 DoH 服务器以 4xx 或 5xx 状态响应以响应 iOS 上的 DoH 查询会发生什么。 For example, if NGINX is broken or for whatever reason, the DoH server responds with any status other than 200. Does the DNS request completely fail and I will get an error message in Safari?例如,如果 NGINX 损坏或由于任何原因,DoH 服务器会以 200 以外的任何状态响应。 Does the iOS device automatically try another DNS? iOS 设备是否会自动尝试另一个 DNS?

The specifications are quite clear, see RFC 8484 " DNS Queries over HTTPS (DoH)", section 4.2.1 "Handling DNS and HTTP Errors" : The specifications are quite clear, see RFC 8484 " DNS Queries over HTTPS (DoH)", section 4.2.1 "Handling DNS and HTTP Errors" :

HTTP responses with non-successful HTTP status codes do not contain replies to the original DNS question in the HTTP request. HTTP 响应不成功 HTTP 状态代码不包含对 DNS 请求中的原始 DNS 问题的回复。 DoH clients need to use the same semantic processing of non-successful HTTP status codes as other HTTP clients. DoH 客户端需要使用与其他 HTTP 客户端相同的不成功 HTTP 状态码的语义处理。 This might mean that the DoH client retries the query with the same DoH server, such as if there are authorization failures (HTTP status code 401; see Section 3.1 of [RFC7235]).这可能意味着 DoH 客户端使用相同的 DoH 服务器重试查询,例如是否存在授权失败(HTTP 状态代码 401;参见 [RFC7235] 的第 3.1 节)。 It could also mean that the DoH client retries with a different DoH server, such as for unsupported media types (HTTP status code 415; see Section 6.5.13 of [RFC7231]), or where the server cannot generate a representation suitable for the client (HTTP status code 406; see Section 6.5.6 of [RFC7231]), and so on.这也可能意味着 DoH 客户端使用不同的 DoH 服务器重试,例如针对不受支持的媒体类型(HTTP 状态代码 415;参见 [RFC7231] 的第 6.5.13 节),或者服务器无法生成适合客户端的表示(HTTP 状态码 406;参见 [RFC7231] 的第 6.5.6 节)等等。

Then the exact behavior will depend on the client used obviously, but that means the question not being really on-topic here as not related to programming.那么确切的行为显然取决于所使用的客户端,但这意味着问题在这里并不是真正的主题,因为与编程无关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将NSRegularExpression写入xx:xx:xx? - how to write NSRegularExpression to xx:xx:xx? iOS 14、mobileconfig、DNS over HTTPS 支持 DNSDomainMatch 白名单 - iOS 14, mobileconfig, DNS over HTTPS with DNSDomainMatch whitelist support 在Snow Leopard上运行带有iOS 6.xx的XCode 4.5 - Running XCode 4.5 with iOS 6.xx on Snow Leopard xx-xx-xxx 中的 UITextField 格式 - UITextField format in xx-xx-xxx 如何使用人类语言显示日期,例如“今天 xx:xx pm”、“昨天 xx:xx am”? - How to display date with human language like “Today at xx:xx pm”, “Yesterday at xx:xx am”? iOS应用内购买收据验证-如果服务器关闭会发生什么? - iOS in-app purchase receipt validation - What happens if server is down? 删除服务器/后端帐户时,iOS订阅会发生什么? - What happens to iOS subscriptions when the server / backend account is deleted? 无法打开 URL: maps:0,0?q=XX,XX - Unable to open URL: maps:0,0?q=XX,XX 没有可见的接口声明方法xx - No visible interface declares the method xx iOS:UIView子类init将调用[super init]然后调用超类中的方法,为什么它会调用[subclass initWithFrame:xx]? - iOS: UIView subclass init will call [super init] then call methods in super class, why it will call [subclass initWithFrame:xx]?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM