Re: Question Regarding RFC2616-14.1 Accept Header
Amos Jeffries <squid3@treenet.co.nz> Fri, 01 April 2016 19:10 UTC
Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E421012D6C3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 1 Apr 2016 12:10:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.931
X-Spam-Level:
X-Spam-Status: No, score=-6.931 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
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 HAxlrHH4RITB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 1 Apr 2016 12:10:24 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CB1CD12D1AF for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 1 Apr 2016 12:10:24 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1am4O9-0005p3-OD for ietf-http-wg-dist@listhub.w3.org; Fri, 01 Apr 2016 19:05:45 +0000
Resent-Date: Fri, 01 Apr 2016 19:05:45 +0000
Resent-Message-Id: <E1am4O9-0005p3-OD@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <squid3@treenet.co.nz>) id 1am4O6-0005oM-FE for ietf-http-wg@listhub.w3.org; Fri, 01 Apr 2016 19:05:42 +0000
Received: from [121.99.228.82] (helo=treenet.co.nz) by lisa.w3.org with esmtp (Exim 4.80) (envelope-from <squid3@treenet.co.nz>) id 1am4O4-0006Xx-Fi for ietf-http-wg@w3.org; Fri, 01 Apr 2016 19:05:41 +0000
Received: from [192.168.20.251] (unknown [121.98.45.158]) by treenet.co.nz (Postfix) with ESMTP id 66CB1E6F35 for <ietf-http-wg@w3.org>; Sat, 2 Apr 2016 07:05:07 +1200 (NZST)
To: ietf-http-wg@w3.org
References: <20160331183255.GA32099@68-f7-28-d0-dd-36.libcore.so>
From: Amos Jeffries <squid3@treenet.co.nz>
Message-ID: <56FEC640.5070704@treenet.co.nz>
Date: Sat, 02 Apr 2016 08:04:32 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0
MIME-Version: 1.0
In-Reply-To: <20160331183255.GA32099@68-f7-28-d0-dd-36.libcore.so>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=121.99.228.82; envelope-from=squid3@treenet.co.nz; helo=treenet.co.nz
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-1.178, BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1am4O4-0006Xx-Fi c4377cd714374346f4e1bb39fbbafd90
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Question Regarding RFC2616-14.1 Accept Header
Archived-At: <http://www.w3.org/mid/56FEC640.5070704@treenet.co.nz>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31376
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
On 1/04/2016 7:33 a.m., Alex Crawford wrote: > Hello, > > First off, my apologies if this is the wrong list for this question, but I've > had a heck of a time trying to find someone knowledgeable on this topic. > > I'm working on a utility that fetches its config via HTTP from a remote system. > The configuration language for this utility will evolve over time, so I need a > way for the utility to convey which configuration versions are valid. I'd like > to use the HTTP Accept header for this task and I think it would look something > like the following (broken across lines for readability): > > application/vnd.coreos.ignition+json; version=2, > application/vnd.coreos.ignition+json; version=1; q=0.5 > > My intent is to convey to the remote system that this particular version of the > utility can accept version 1 or 2 of application/vnd.coreos.ignition+json, with > a preference for version 2. I believe this is syntactically correct, but I'm > wondering if it's semantically correct as well - am I abusing this > functionality? Extension parameters like 'version=DIGIT' are interpreted by the origin server receiving them and should be passed-through by any intermediary software. Beyond that the server implementation defines what the semantics are - so it depends on whether you are coding for the server too. But do not forget that HTTP contains caching. So your API definition MUST send Accept back in the Vary header when doing this. Using a unique URL for each config version and just fetching the desired version would be best. Alternatively; A custom header could be used instead of Accept. So you can list it in the Vary header without causing the huge variant permutation space that Accept will force on caches. Alternatively; The User-Agent header is supposed to contain the name and version of the software generating the GET message. Your server could 'know' what versions of config are able to be sent to which client application version. So the User-Agent header of the GET message is sufficient to find the resource to respond with. Vary would then need User-Agent header listed. This method has similar permutation space issues to Accept. So is not quite as good as it could be. Amos
- Question Regarding RFC2616-14.1 Accept Header Alex Crawford
- Re: Question Regarding RFC2616-14.1 Accept Header Amos Jeffries