Re: [Netconf] Opinion poll on RESTCONF encoding

Ladislav Lhotka <lhotka@nic.cz> Fri, 28 August 2015 07:22 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DB1581A8A4C for <netconf@ietfa.amsl.com>; Fri, 28 Aug 2015 00:22:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.661
X-Spam-Level:
X-Spam-Status: No, score=-5.661 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HELO_EQ_CZ=0.445, HOST_EQ_CZ=0.904, RCVD_IN_DNSWL_HI=-5, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24B2xf3vO0v5 for <netconf@ietfa.amsl.com>; Fri, 28 Aug 2015 00:22:40 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CC7FD1A1EF7 for <netconf@ietf.org>; Fri, 28 Aug 2015 00:22:39 -0700 (PDT)
Received: from [IPv6:2001:718:1a02:1:800e:14f8:7ab9:c7cc] (unknown [IPv6:2001:718:1a02:1:800e:14f8:7ab9:c7cc]) by mail.nic.cz (Postfix) with ESMTPSA id 14F89181855; Fri, 28 Aug 2015 09:22:38 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nic.cz; s=default; t=1440746558; bh=Xf/VQwqrGOlUCl+1AYZy7bcTnJi2i828NsydTgANVLI=; h=From:Date:To; b=cXqPltK2YtSr724hD4jGuowb6OCjqHcVfKabLF5J7N8pM/s+O7/PeBII8iJJoH42l YpdACcm7dsD/0BghAdYhaxvS6mGbZ1HHIm7b1N2I7JCS30KLNCeyVQL9A8qZfK+nx8 dQJNrAqg/UD3Ng1v6+PaR7aQbQYMdvkWf8U5LEP0=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <641268B1-E221-46E7-8D61-4FAEF027FBA4@gmail.com>
Date: Fri, 28 Aug 2015 09:22:41 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <BE3DB0B4-61B4-4EB6-9A97-47B3C865A434@nic.cz>
References: <1232641A-BE91-4AAD-962D-779E4D85403A@gmail.com> <CABCOCHRkmHw0oy8-AYyin+YaE8-2aS5fjwAmggx_FUOzd1rg5A@mail.gmail.com> <D203D804.D372C%kwatsen@juniper.net> <20150827052649.GA87193@elstar.local> <D204A742.D3B4B%kwatsen@juniper.net> <20150827161221.GA88495@elstar.local> <D204B66C.D3BD6%kwatsen@juniper.net> <641268B1-E221-46E7-8D61-4FAEF027FBA4@gmail.com>
To: Mahesh Jethanandani <mjethanandani@gmail.com>
X-Mailer: Apple Mail (2.2102)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/netconf/YOW9HGKDd-TPp2qle2_z3HImhUQ>
Cc: Netconf <netconf@ietf.org>
Subject: Re: [Netconf] Opinion poll on RESTCONF encoding
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Aug 2015 07:22:43 -0000

> On 28 Aug 2015, at 02:45, Mahesh Jethanandani <mjethanandani@gmail.com> wrote:
> 
> What I am reading from the discussion till now is:
> 
> 	• Accept request-header needs to be supported and that it is not an option.
> 	• The client can choose not to send the header, in which case the server can pick an encoding of its choice and respond with it.
> 	• The client can send what it does support, in which case the server either accepts the encoding it supports or returns a 406. The 406 (Not Acceptable) status codes include information about the available representations.
> 	• The client can send “*/*". Same behavior as not getting a Accept header.
> 	• Server MAY support advertising of encodings using the ./well-known/host-meta file and XRD.

+1

Lada

> 
> If this a fair summary, we can update the RESTCONF draft with these details.
> 
>> On Aug 27, 2015, at 10:31 AM, Kent Watsen <kwatsen@juniper.net> wrote:
>> 
>> 
>> 
>> 
>>> It does not matter, we should not change HTTP.
>> 
>> But we're not, HTTP has a bunch of "SHOULD"s that can and should be
>> restricted as it makes sense for REST APIs.   Please feel free to search
>> REST API best practices on this.
>> 
>> 
>> 
>>> This is what RRC 7231 has to say:
>>> 
>>>  A request without any Accept header field implies that the user agent
>>>  will accept any media type in response.
>> 
>> Lada brought this up too.   Yes, this could be interpreted as "assume */*
>> was passed" or, per section 3.4.2:
>> 
>>   A server might choose not to send an initial representation, other
>>   than the list of alternatives, and thereby indicate that reactive
>>   negotiation by the user agent is preferred.  For example, the
>>   alternatives listed in responses with the 300 (Multiple Choices) and
>>   406 (Not Acceptable) status codes include information about the
>>   available representations so that the user or user agent can react by
>>   making a selection.
>> 
>> 
>> 
>> BTW, I tested `wget` and `curl` also, they both pass "*/*" like the
>> mainline browsers...
>> 
>> Kent
>> 
>> 
>> 
>> 
>> 
>> 
> 
> Mahesh Jethanandani
> mjethanandani@gmail.com
> 
> 
> 
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C