Subject: Media-type containing semi-colon but no parameter

From: "Anne van Kesteren" <[email-masked]>
Date: Mon, 04 Jul 2011 15:49:37 +0200

Currently per HTTP the following constitutes an incorrect Content-Type  
header:

   Content-Type: text/html;

as per media-type the semi-colon must be followed by a parameter. No  
implementation I know of treats that as an unknown media type however.  
They arrive at the somewhat obvious text/html media type. It would make  
sense to me if HTTP were changed to allow a trailing semi-colon.

-- 
Anne van Kesteren
http://annevankesteren.nl/

---

From: Julian Reschke <[email-masked]>
Date: Mon, 04 Jul 2011 16:02:35 +0200

> sense to me if HTTP were changed to allow a trailing semi-colon.

Well, this may break existing implementations that enforce it.

Have you seen header field instances like this in the wild?

Best regards, Julian

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Tue, 05 Jul 2011 00:47:48 +0200

>Have you seen header field instances like this in the wild?

Among 130 000 headers I have laying around (sample is probably loading
a bunch of random documents linked from Wikipedia using CutyCapt):

  % grep -ai "content-type" headers_ | grep -P ";$" | gnusort | uniq -c
      3 Content-Type: application/x-javascript;
      1 Content-Type: image/jpeg;
      1 Content-Type: text/css;
      1 Content-Type: text/html; charset=ISO-8859-1;
      1 Content-Type: text/html; charset=shift-jis;
      3 Content-Type: text/javascript;

I agree the syntax as it is complicates implementations for no reason.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/