Re: [ietf-types] Registration of media typeimage/svg+xml
Julian Reschke <julian.reschke@gmx.de> Thu, 18 November 2010 20:20 UTC
Return-Path: <julian.reschke@gmx.de>
X-Original-To: ietf-types@core3.amsl.com
Delivered-To: ietf-types@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 39A883A6811 for <ietf-types@core3.amsl.com>; Thu, 18 Nov 2010 12:20:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.083
X-Spam-Level:
X-Spam-Status: No, score=-105.083 tagged_above=-999 required=5 tests=[AWL=-2.484, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0h5iixbKlffo for <ietf-types@core3.amsl.com>; Thu, 18 Nov 2010 12:20:03 -0800 (PST)
Received: from pechora3.lax.icann.org (pechora3.icann.org [208.77.188.38]) by core3.amsl.com (Postfix) with ESMTP id 1202E3A68CF for <ietf-types@ietf.org>; Thu, 18 Nov 2010 12:20:03 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by pechora3.lax.icann.org (8.13.8/8.13.8) with SMTP id oAIKKFKO005059 for <ietf-types@iana.org>; Thu, 18 Nov 2010 12:20:35 -0800
Received: (qmail invoked by alias); 18 Nov 2010 20:20:13 -0000
Received: from p508FCC1A.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.204.26] by mail.gmx.net (mp070) with SMTP; 18 Nov 2010 21:20:13 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX18LrsF5QN4LtqW/rCxPRHJNPHE5krXgHO2ocZv9zn tZ1Zef/g1MV+vm
Message-ID: <4CE58A74.2060503@gmx.de>
Date: Thu, 18 Nov 2010 21:20:04 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6
MIME-Version: 1.0
To: Chris Lilley <chris@w3.org>
References: <1364503167.20100617162624@w3.org> <1715145489.20101118190255@w3.org> <4CE57C38.4080307@gmx.de> <282747763.20101118210121@w3.org>
In-Reply-To: <282747763.20101118210121@w3.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.0 (pechora3.lax.icann.org [208.77.188.38]); Thu, 18 Nov 2010 12:20:36 -0800 (PST)
Cc: Alexey Melnikov <alexey.melnikov@isode.com>, ietf-types@iana.org, ietf-xml-mime@imc.org
Subject: Re: [ietf-types] Registration of media typeimage/svg+xml
X-BeenThere: ietf-types@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "Media \(MIME\) type review" <ietf-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf-types>
List-Post: <mailto:ietf-types@ietf.org>
List-Help: <mailto:ietf-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Nov 2010 20:20:06 -0000
On 18.11.2010 21:01, Chris Lilley wrote: > On Thursday, November 18, 2010, 8:19:20 PM, Julian wrote: > > JR> On 18.11.2010 19:02, Chris Lilley wrote: >>> ... >>> Security considerations: >>> ... >>> SVG documents may be transmitted in compressed form using gzip >>> compression. For systems which employ MIME-like mechanisms, such >>> as HTTP, this is indicated by the Content-Encoding or >>> Transfer-Encoding header, as appropriate; for systems which do >>> not, such as direct filesystem access, this is indicated by the >>> filename extension and by the Macintosh File Type Codes. In >>> addition, gzip compressed content is readily recognised by the >>> initial byte sequence as described in [RFC1952] section 2.3.1. >>> ... > > JR> 1) What does this have to do with "Security Considerations"? > > Please read BCP 13, RFC 4288 section 4.6 "Security requirements" where you will find > > A media type that employs compression may provide an opportunity > for sending a small amount of data that, when received and > evaluated, expands enormously to consume all of the recipient's > resources. All media types SHOULD state whether or not they > employ compression, and if they do they should discuss > what steps need to be taken to avoid such attacks. Agreed. But then it would need to be clearly stated, that, you know, the content can be gzipped and still be image/svg+xml. Can it? Because otherwise if you're talking about compression on the transport layer, this doesn't need to be stated here. It confuses layers. > JR> 2) I find the whole paragraph misleading; I'd like to see a clear > JR> statement about whether the stream of octets resulting from gzipping SVG > JR> can be labeled as "image/svg+xml" or not > > Not by itself, no. In a MIME context, it must be labelled as Content-type: image/svg+xml **AND** Transfer-Encoding: gzip. Please note the AND. So why we do have the paragraph above in the first place? *Any* media type can be used with Content-Encoding: gzip over HTTP. > This is not the same thing as Content-type: application/octet-stream and Transfer-Encoding: gzip - because that conveys the encoding, but omits the content type. Nobody said that. > In other words the encoding label ADDS TO the media type; it does not remove the type. "The Content-Encoding entity-header field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type header field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type." -- <http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.14.11> So once you apply the Content-Encoding you have to undo it to get back the payload specified by the Content-Type. It's orthogonal. It doesn't make the payload an instance of the media type *until* you undo the encoding. > Indeed, this is why separate labelling of encoding was added. Back in the early days people would use gzipped VRML or gzipped PostScript, and attempted to register application/gzip; but since they were using the Media Type to hold the encoding information they had lost important information, so VRML viewers were sent PostScript and so on. Some people said this was okay, unzip and then look at the filename extension. But a much better way was to add the encoding headers. > > JR> (please consider transports > JR> other than HTTP, such as a file system that actually supports typing by > JR> Internet media types). > > Please feel free to file a bug report for the BeOS filesystem saying that it should support labelling of encodings in addition to media types. > > Speaking as a former BeOS user myself, I still consider modern SVG implementations (of which there are many) to be a rather more numerous and relevant consideration than a promising, but obsolete and abandoned, operating system from 15 years ago. I really honestly (!) have no idea what you're referring to. For the media type registration what's relevant is what kind of octet sequences you can label with the type you register. So, I hear you saying: "it can be gzipped when used in a MIME context if and only if you label it with "content-encoding: gzip". That's true, and nobody disagrees with it. It's true for *any* media type. It doesn't require any additional statements. > JR> If yes, that's a violation of "+xml" (and the last sentence points into > JR> this direction). If not, please remove the paragraph above. > > JR> 3) If the intent is to say that "svgz" acts as file extension for > JR> gzipped SVG, and *that* content can be served over HTTP as-is with > > JR> Content-Type: image/svg+xml > JR> Content-Encoding: gzip > > That is exactly what it says, yes > > JR> than this is obviously ok > > I'm glad its obviously OK. But the way it's stated is totally misleading. Please keep in mind that I only joined this discussion after other people complained (I stumbled into it during a conversation at the IETF meeting in Maastricht). > JR> because it follows from RFC 2616, and has > JR> *nothing* to do with the media type (except for the extension > JR> recommendation). > > So you oppose reminding people how to detect such gzipped content? > > Why would you want to do that? Because it makes it sound like detecting gzipped content by inspecting the header is an acceptable way to handle this media type. Best regards, Julian
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Julian Reschke
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Julian Reschke
- Re: [ietf-types] Registration of media typeimage/… Ned Freed
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Julian Reschke
- Re: [ietf-types] Registration of media typeimage/… Yves Lafon
- Re: [ietf-types] Registration of media typeimage/… Julian Reschke
- Re: [ietf-types] Registration of media typeimage/… Martin J. Dürst
- Re: [ietf-types] Registration of media typeimage/… Martin J. Dürst
- Re: [ietf-types] Registration of media typeimage/… Alexey Melnikov
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Larry Masinter
- Re: [ietf-types] Registration of media typeimage/… Martin J. Dürst
- Re: [ietf-types] Registration of media typeimage/… Martin J. Dürst
- Re: [ietf-types] Registration of media typeimage/… Martin J. Dürst
- Re: [ietf-types] Registration of media typeimage/… Keith Moore
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Martin J. Dürst
- Re: [ietf-types] Registration of media typeimage/… Ned Freed
- Re: [ietf-types] Registration of media typeimage/… Ned Freed
- Re: [ietf-types] Registration of media typeimage/… Julian Reschke
- Re: [ietf-types] Registration of media typeimage/… Julian Reschke
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Alexey Melnikov
- Re: [ietf-types] Registration of media typeimage/… Ned Freed
- Re: [ietf-types] Registration of media typeimage/… Chris Lilley
- [ietf-types] Registration of media typeimage/svg+… Chris Lilley
- Re: [ietf-types] Registration of media typeimage/… Ned Freed
- Re: [ietf-types] Registration of media typeimage/… Martin J. Dürst