[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: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Mon, 28 Apr 2008 18:33:20 +0300 (IDT)

Stefan Sperling wrote on Mon, 28 Apr 2008 at 17:00 +0200:
> On Mon, Apr 28, 2008 at 10:31:58AM -0400, C. Michael Pilato wrote:
> > $ svn pget svn:mime-type ~/projects/subversion/COMMITTERS
> > text/plain; charset=UTF-8
>
> 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.
>
>

Why is a space allowed *after* the semicolon (as in cmpilato's example)?

The definition of 'parameter' doesn't seem to allow whitespace:

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-28 17:33:35 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.