[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] validate MIME type correctly

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 28 Apr 2008 17:00:23 +0200

On Mon, Apr 28, 2008 at 10:31:58AM -0400, C. Michael Pilato wrote:
> Stefan Sperling wrote:
>>> except I am not sure if you want to
>>> allow svn:mime_type="type/subtype ; parameter = value"
>>
>> The code explicitly allows this. I don't know whether this
>> is good/bad, but I don't think we should break this since
>> it's probably being used in the wild somewhere.
>
> Indeed.
>
> $ svn pget svn:mime-type ~/projects/subversion/COMMITTERS
> text/plain; charset=UTF-8

Heh :)

Btw, if there's any space before the semicolon (i.e. 'text/plain ;')
trunk will now raise an error. RFC 1521 seems to agree with this:

 content := "Content-Type" ":" type "/" subtype *(";" parameter)
 subtype := token
 token := 1*<any (ASCII) CHAR except SPACE, CTLs, or tspecials>

But I hope we're not breaking anyone's setup.

-- 
Stefan Sperling <stsp_at_elego.de>                    Software Monkey
 
German law requires the following banner :(
elego Software Solutions GmbH                            HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12        Tel:  +49 30 23 45 86 96 
13355 Berlin                              Fax:  +49 30 23 45 86 95
http://www.elego.de                               CEO: Olaf Wagner
 
Store password unencrypted (yes/no)? No

  • application/pgp-signature attachment: stored
Received on 2008-04-28 16:59:54 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.