[apps-discuss] RFC3023: Is note about HTTP Accept header wrong

Raphael Bossek <raphael.bossek@googlemail.com> Thu, 01 September 2011 13:24 UTC

Return-Path: <raphael.bossek@googlemail.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1A59F21F9B7D for <apps-discuss@ietfa.amsl.com>; Thu, 1 Sep 2011 06:24:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.977
X-Spam-Level:
X-Spam-Status: No, score=-4.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, GB_I_LETTER=-2, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DPmQ8v1E3yCY for <apps-discuss@ietfa.amsl.com>; Thu, 1 Sep 2011 06:24:41 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 0373E21F9B7B for <apps-discuss@ietf.org>; Thu, 1 Sep 2011 06:24:40 -0700 (PDT)
Received: by vxi29 with SMTP id 29so1617600vxi.31 for <apps-discuss@ietf.org>; Thu, 01 Sep 2011 06:26:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=i1m5iQcAsWjypQyXoGIPYmRrr7dLDu3NzgtRgQvGeok=; b=fHzo/gFBeUkutjGg2DVetLp8U0+eAvYmQVC93wwiMlaKbtRnMC+o4N89CQrRFA3r7L 194gc2TrefMobNV83Q44OExYaOuuTE99d2MNw3K9iTI5HCS3TAk6kG/VkplPgkLYzymc 0tGYgBN0jLisxNZj6cOt0Dtu2c4tle7m6a5Ig=
MIME-Version: 1.0
Received: by 10.52.24.129 with SMTP id u1mr240881vdf.175.1314883573756; Thu, 01 Sep 2011 06:26:13 -0700 (PDT)
Received: by 10.220.180.129 with HTTP; Thu, 1 Sep 2011 06:26:13 -0700 (PDT)
Date: Thu, 01 Sep 2011 15:26:13 +0200
Message-ID: <CABwmVOzQ1kMX1jJKZPWj_TW_V=pzZV4y1PB4+6j7+SM6K6OxQQ@mail.gmail.com>
From: Raphael Bossek <raphael.bossek@googlemail.com>
To: apps-discuss@ietf.org
Content-Type: text/plain; charset="UTF-8"
X-Mailman-Approved-At: Thu, 01 Sep 2011 08:52:05 -0700
Subject: [apps-discuss] RFC3023: Is note about HTTP Accept header wrong
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Sep 2011 13:25:53 -0000

Need your help,

Study the RFC 3023 found the following note that seams to be incorrect
for me. Here the note at page 17
(http://tools.ietf.org/html/rfc3023#page-17):

NOTE: Section 14.1 of HTTP[RFC2616] does not support Accept
headers of the form "Accept: */*+xml" and so this header MUST NOT
be used in this way.

In RFC 2616 section 14.1 Accept at page 100
(http://tools.ietf.org/html/rfc2616#section-14.1) the BNF says:

       Accept         = "Accept" ":"
                        #( media-range [ accept-params ] )

       media-range    = ( "*/*"
                        | ( type "/" "*" )
                        | ( type "/" subtype )
                        ) *( ";" parameter )
       accept-params  = ";" "q" "=" qvalue *( accept-extension )
       accept-extension = ";" token [ "=" ( token | quoted-string ) ]

Let us focus on the definition of `subtype` in section 3.7 Media types
(http://tools.ietf.org/html/rfc2616#section-3.7):

       media-type     = type "/" subtype *( ";" parameter )
       type           = token
       subtype        = token

We have now to find the definition of `token` in section 2.2 Basic
rules at page 17 (http://tools.ietf.org/html/rfc2616#page-17):

       token          = 1*<any CHAR except CTLs or separators>
       separators     = "(" | ")" | "<" | ">" | "@"
                      | "," | ";" | ":" | "\" | <">
                      | "/" | "[" | "]" | "?" | "="
                      | "{" | "}" | SP | HT

CTL and seperator does not define a + (plus) char too. In other word +
(plus) is allowed. Please refer to section 2.2 Basic rules at page 17
(http://tools.ietf.org/html/rfc2616#page-16):

       OCTET          = <any 8-bit sequence of data>
       CHAR           = <any US-ASCII character (octets 0 - 127)>
       UPALPHA        = <any US-ASCII uppercase letter "A".."Z">
       LOALPHA        = <any US-ASCII lowercase letter "a".."z">
       ALPHA          = UPALPHA | LOALPHA
       DIGIT          = <any US-ASCII digit "0".."9">
       CTL            = <any US-ASCII control character
                        (octets 0 - 31) and DEL (127)>
       CR             = <US-ASCII CR, carriage return (13)>
       LF             = <US-ASCII LF, linefeed (10)>
       SP             = <US-ASCII SP, space (32)>
       HT             = <US-ASCII HT, horizontal-tab (9)>
       <">            = <US-ASCII double-quote mark (34)>

Where is my mistake?
Raphael