cancel
Showing results for 
Search instead for 
Did you mean: 
trishoar
Level 11

Custom MediaTypes

Hi All,

Does any one know how to add new MediaTypes to MWG7?

I need to be able to detect objects that are listed as application/x-fcs (this is used by BBC iplayer) which is not included in the standard list.

Thanks

Tris

0 Kudos
6 Replies
McAfee Employee

Re: Custom MediaTypes

Hello Tris,

you can't yet. What is your goal, what do you want to achieve?

thanks,

Michael

0 Kudos
trishoar
Level 11

Re: Custom MediaTypes

Hi Michael,

I'm trying to write a bypass for traffic from BBC iPlayer. iPlayer works using hundreds of little post requests to IP addresses in the Akamai network, I'm trying to write a rule that intercepts this early in the cycle and applies a stop cycle rule so as to not burden the server/AV scanner with processing requests that we are happy to let through. The MimeType looked the easiest and lest intensive way to identify this traffic, though the rule will apply to other sites that use application/x-fcs as well, the URL filtering would prevent access to any unsavoury sites. A good portion of our traffic is to iPlayer so this should help keep our load low when we scale up to all the customers.

Thanks,

Tris

0 Kudos
eelsasser
Level 15

Re: Custom MediaTypes

You can create a rule which checks for the Content-Type header reported by the server. It will not do magic byte checking, but it is a selection criteria that would allow for the bypass you want.

I believe the property would be:

Rule Criteria:
Header.Response.Get ("Content-Type") equals "application/x-fcs"

0 Kudos
trishoar
Level 11

Re: Custom MediaTypes

Ah!! thank you Erik.

I was thinking in totaly the wrong way. Magic Bytes are preferable, but this will acomplish exactly what I need.

Best regards,

Tris

0 Kudos
eelsasser
Level 15

Re: Custom MediaTypes

Magic Bytes are usually preferable, but with some data types, you can't do them because they are random binary streams of data with no set format.

I don't know what iPlayer is, this method should suffice.

0 Kudos
alexott
Level 11

Re: Custom MediaTypes

Hello Tris

if you could provide us some samples of traffic, I could try to add signatures for for this content.

P.S. instead accessing to headers directly, it's better to use the MediaType.FromHeader property that will take care for removing additional parameters from original Header's value. And it also will perform "normalization" of mime type, basing on table of existing type aliases

0 Kudos