Subject: 'qs' parameter in Content-Type header

From: Christoph Schneegans <[email-masked]>
Date: Sun, 02 Jun 2002 02:18:59 GMT

Hello!

Using the AddType directive, Apache is able to add a 'qs' parameter to
the Content-Type header, which might result in the following output:

  Content-Type: application/xhtml+xml;charset=iso-8859-1;qs=0.999

Is the 'qs' parameter legal there? Former discussions couldn't provide a
definitive answer. I hope you can.

Regards,
Christoph Schneegans

-- 
<http://schneegans.de/>

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Sun, 02 Jun 2002 05:15:10 +0200

>  Content-Type: application/xhtml+xml;charset=iso-8859-1;qs=0.999

Using the AddType directive, you are able to create abitrary
Content-Type headers.

>definitive answer. I hope you can.

No, valid paramters for a given media type are subject to the media type
registration, RFC 3236 in this case. The RFC lists two optional
parameters for this type, "charset" and "profile", no mention of "qs".
There is a special case in HTTP/1.1 in Accept header fields, the "q"
parameter, it is valid for all types, since it is not considered a media
type parameter, this is however not the case for "qs", especially not in
the Content-Type header field. "qs" is inspired by the source quality
factor abbreviation of RFC 2295/2296 and documented as an additional
parameter you may use in Apaches type-map files. For Apache, this is a
special parameter in those files and it should never be exposed to the
client application.

regards.

---

From: Christoph Schneegans <[email-masked]>
Date: Thu, 06 Jun 2002 23:25:26 GMT

> Using the AddType directive, you are able to create abitrary

"qs" is somewhat special, see below.

>> Is the 'qs' parameter legal there?
>
> registration, RFC 3236 in this case.

Well, after reading RFC 2616 again, I have to agree with this view.

> "qs" is inspired by the source quality factor abbreviation of RFC
> 2295/2296 and documented as an additional parameter you may use in
> Apaches type-map files.

In addition, the "qs" parameter does affect Apache's negotiation
algorithm when used within an AddType directive, so you would not have
to struggle with .var files - this can be a major benefit. Of course,
the "qs" parameter should not be included in the Content-Type header,
but so far I haven't seen any client that complains about it.

Regards,
Christoph Schneegans

-- 
<http://schneegans.de/>