Hi David,
> I'm researching a way I can use asp to detect if the
> client has the correct plugin or application to play
> a video type by mime type.
>
> Haven't got the whole picture yet but your data base
> of known mime types by extension may help.
To my knowledge, not a single client will list every _supported_
MIME type. It is redundant on future requests to the same server
and, as you can see from the database alone, it could push well
in excess of 4 or 5 kb PER REQUEST adding the irrelevant headers.
After a few clicks on a dialup you could readily eat up a minute
just uploading the request headers themselves. :(
Most clients provide a 'short list' of the primary expected
content types that they support directly or through significant
ActiveX/OBJECT/EMBED objects. IE, for example, will list "*/*"
which implies it "supports" everything. How nice. Other times it
will list "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, */*" (or similar) which likewise says it only
supports the very basics + word, though it fails to list the
supported content types exposed by createable ActiveX objects -
equally as disappointing.
Anyways, check the Request.ServerVariables("HTTP_ACCEPT")
property for those espoused by the client to be supported.
The "*/*" means the client would be pleased to 'download'
anything, though it doesn't know if it is capable of
running/viewing file types not explicitly listed inline.
If you are designing the client-side "viewer" application or have
administrative control over the IE clients that will be visiting
your site, you could modify the registry to make it more
amenable. The series you'll need to modify appears here:
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Accepted Documents]
It's simply an enumerated series of content type declarations
starting at "0" and running as high as the highest exposed
element needs to be. The text value describes the content type
("text/html" for example) that the IE browser will accept. The
exposed values will also need to appear within the exposed
content type value for the CLASS it should invoke
([HKCR\.ext\@"Content Type"="prefix/suffix"]).
If you need more assistance or demo code for any of this, just
ask. :)
Regards,
Shawn K. Hall
http://ReliableAnswers.com/