Subject: HTTP MIME types question

From: "Voronkov Konstantin" <[email-masked]>
Date: Thu, 13 Mar 2003 10:38:59 +0300

Hello All!

I have a question about HTTP MIME types.
Our company created application which uses HTTP protocol for communications.
What is the best MIME type to use?
Can any proxy change content (e.g. for security reasons) if I use
 no HTTP MIME type?
Some of proxy servers can try to cut banners,
 remove sounds and so on. How can I avoid this?

Regards,
Voronkov Konstantin
ICQ 40202717

---

From: Alex Rousskov <[email-masked]>
Date: Thu, 13 Mar 2003 09:07:38 -0700 (MST)

On Thu, 13 Mar 2003, Voronkov Konstantin wrote:

> I have a question about HTTP MIME types. Our company created
> application which uses HTTP protocol for communications. What is the
> best MIME type to use?

Depends on the kind of content your application is transmitting as
HTTP payload. Usually, one of the registered MIME types fits well
enough. If not, you can use (and register) your own type. Here is what
Section 3.7 of RFC 2616 has to say:

   Media-type values are registered with the Internet Assigned Number
   Authority (IANA [19]). The media type registration process is
   outlined in RFC 1590 [17]. Use of non-registered media types is
   discouraged.

You may want to read Section 14.17 of the same RFC as well.

> Can any proxy change content (e.g. for security reasons) if I use no
> HTTP MIME type?

Some proxies might. Proxies are known to guess content type by URL
extensions and other methods.

> Some of proxy servers can try to cut banners, remove sounds and so
> on. How can I avoid this?

There may be several ways, depending on your environment.  What are
you sending (HTML, text, opaque bytes)? Who is the client (browser,
custom plugin, applet)? Do you control your clients? In general, using
the no-transform cache-control directive may be a good start (see
section 14.9.5 No-Transform Directive).

HTH,

Alex.

-- 
                            | HTTP performance - Web Polygraph benchmark
www.measurement-factory.com | HTTP compliance+ - Co-Advisor test suite
                            | all of the above - PolyBox appliance

---

From: "Voronkov Konstantin" <[email-masked]>
Date: Tue, 18 Mar 2003 12:08:42 +0300

Alex, thanks for help.

My application sends binary data so I decided
 to use for POST data posting
"Content-Type: application/octet-stream"
For preventing data modifying by proxies I decided to use no-transform
directive.
For requests
 "Cache-request-directive: no-transform"
And for responses
 "Cache-response-directive: no-transform"

Best Regards,
Konstantin

---

From: "Mark Nottingham" <[email-masked]>
Date: Tue, 18 Mar 2003 09:54:35 -0800

In both cases, that should be:

Cache-Control: no-transform

Regards,

---

From: "Voronkov Konstantin" <[email-masked]>
Date: Wed, 19 Mar 2003 09:57:22 +0300

Thanks a lot for your notice.
 I did that mistake by inattention.

Best Regards,
Voronkov Konstantin