Re: [Doh] A question on the mix of DNS and HTTP semantics

Daniel Stenberg <> Sun, 18 March 2018 11:43 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C5F681270A7 for <>; Sun, 18 Mar 2018 04:43:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.211
X-Spam-Status: No, score=-4.211 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id YUhI9CWXAJOW for <>; Sun, 18 Mar 2018 04:43:58 -0700 (PDT)
Received: from ( [IPv6:2a00:1a28:1200:9::2]) by (Postfix) with ESMTP id 176791242F5 for <>; Sun, 18 Mar 2018 04:43:57 -0700 (PDT)
Received: from (mail []) by (8.15.2/8.15.2/Debian-4) with ESMTPS id w2IBhsgA025990 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 18 Mar 2018 12:43:54 +0100
Received: from localhost (dast@localhost) by (8.15.2/8.15.2/Submit) with ESMTP id w2IBhr3b025938; Sun, 18 Mar 2018 12:43:53 +0100
X-Authentication-Warning: dast owned process doing -bs
Date: Sun, 18 Mar 2018 12:43:53 +0100 (CET)
From: Daniel Stenberg <>
To: Ted Hardie <>
cc: Ben Schwartz <>,, Patrick McManus <>
In-Reply-To: <>
Message-ID: <>
References: <> <> <> <>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
X-fromdanielhimself: yes
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=US-ASCII
Archived-At: <>
Subject: Re: [Doh] A question on the mix of DNS and HTTP semantics
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: DNS Over HTTPS <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 18 Mar 2018 11:44:00 -0000

On Sun, 18 Mar 2018, Ted Hardie wrote:

> Saying something in the document like "only 2xx response codes will carry 
> response bodies with DNS UDP wireformat" would be a short and sweet way of 
> saying that in the document, if there is working group consensus that this 
> is true.  Based on my conversations yesterday, I am not sure that there is 
> complete consensus on this point, though there may very well be rough 
> consensus.

I'm firmly in the only-2xx-carry-response-bodies-to-care-about camp. I don't 
even understand how it would work otherwise.

What other HTTP response codes could be used to transmit DNS responses?

> A pure transport failure may result in a retry.  There are some of these 
> responses which strongly indicate that such a retry will result in failures 
> (e.g. 403).  If you do not synthesize some message to the DNS client about 
> the type of failure, and the server does not provide one, what part of the 
> system avoids the retry?

For all 4xx HTTP response codes, the "fault" is in the client side (the 
request) so if you as a client decide to retry the request it doesn't at least 
make any sense to send an identical request again.

I don't think 4xx strictly avoids retries. It informs the client about the 
fact that the request, as-is, was denied. A retry would then have to change 
something in the request for it to be successful. 401 and 407 are good 
examples of this, for which clients often retry with a modified request (with 
added auth headers).