content inspection in absence of media type, was: [apps-discuss] APPSDIR review of draft-ietf-httpbis-p2-semantics-24

Julian Reschke <julian.reschke@gmx.de> Mon, 28 October 2013 16:09 UTC

Return-Path: <ietf-http-wg-request@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 590C921F9F8F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 28 Oct 2013 09:09:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.656
X-Spam-Level:
X-Spam-Status: No, score=-7.656 tagged_above=-999 required=5 tests=[AWL=2.943, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 xmr5o9UmlLBl for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 28 Oct 2013 09:09:13 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 64DAA21E8092 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 28 Oct 2013 09:09:12 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1VapLv-0005M0-3l for ietf-http-wg-dist@listhub.w3.org; Mon, 28 Oct 2013 16:07:39 +0000
Resent-Date: Mon, 28 Oct 2013 16:07:39 +0000
Resent-Message-Id: <E1VapLv-0005M0-3l@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1VapLm-0005LC-0B for ietf-http-wg@listhub.w3.org; Mon, 28 Oct 2013 16:07:30 +0000
Received: from mout.gmx.net ([212.227.15.19]) by lisa.w3.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1VapLh-0007Gp-2e for ietf-http-wg@w3.org; Mon, 28 Oct 2013 16:07:29 +0000
Received: from [192.168.1.102] ([217.91.35.233]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M2Glc-1VrGGT3CqK-00s8kj for <ietf-http-wg@w3.org>; Mon, 28 Oct 2013 17:06:58 +0100
Message-ID: <526E8B9E.8030006@gmx.de>
Date: Mon, 28 Oct 2013 17:06:54 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
MIME-Version: 1.0
To: S Moonesamy <sm+ietf@elandsys.com>, apps-discuss@ietf.org, draft-ietf-httpbis-p2-semantics.all@tools.ietf.org
CC: iesg@ietf.org, ietf-http-wg@w3.org, ietf@ietf.org
References: <6.2.5.6.2.20131027115007.07e32210@elandnews.com>
In-Reply-To: <6.2.5.6.2.20131027115007.07e32210@elandnews.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:ah8Q0bhr+ouwsf9mcnrl4d+eHkSX7f33cp9aN5K6ZEZEhLqkAYX VJxa4ttztIyvkLFS3gCxC8RidqTJnsO9iIqt9zWxZVdnOdxVKkCI6V3SBmMAwws7zSxcsfX w2zM5g8Z2EnQCg3tU3VSVKUhyGFXIQQ4bUL1ixSm0cuU9RXPf0ikH2oO2cQ1MGUYblGujwL sEUuUUsSdTPACTR4xZe6w==
Received-SPF: pass client-ip=212.227.15.19; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-2.379, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1VapLh-0007Gp-2e 3ad6b2fcfd1812bf90b4537f46cf34b3
X-Original-To: ietf-http-wg@w3.org
Subject: content inspection in absence of media type, was: [apps-discuss] APPSDIR review of draft-ietf-httpbis-p2-semantics-24
Archived-At: <http://www.w3.org/mid/526E8B9E.8030006@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/20142
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 2013-10-28 09:07, S Moonesamy wrote:
> ...
> Major Issues:
>
> In Section 3.1.1.5:
>
>    'If a Content-Type header field is not present, the recipient MAY
>     either assume a media type of "application/octet-stream" ([RFC2046],
>     Section 4.5.1) or examine the data to determine its type.'
>
> According to RFC 2046, the "octet-stream" subtype is used to indicate
> that a body contains arbitrary data.  The RFC 2119 "may" leaves it to
> the implementor to make an assumption.  I suggest turning this into a
> recommendation so that the assumption is clear to the implementor.
> There is a discussion of MIME sniffing in
> draft-ietf-websec-mime-sniff-03.  There has been discussion about MIME

(which expired ~2 years ago)

> or Content sniffing over the years.  I am aware that some browsers do
> MIME sniffing.  I understand that it is sometimes needed to make the Web
> work.  However, it can lead to security vulnerabilities.  The paragraph
> which follows the one quoted above discusses about that.  I listed this
> as a major issue for the attention of the Applications Area Directors.
> ...

Could you clarify what exactly the issue is?

RFC 2616 said 
(<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.7.2.1.p.4>):

> Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream".

...which isn't that different.

Best regards, Julian