Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7
Report Inappropriate Content
Message 1 of 4

media type not detected in embedded cycle


There is a link that is not matching "Media type not detected" in Response cycle because the media type is detected: text/xml

List.OfMediaType.IsEmpty(MediaType.EnsuredTypes) = false

MediaType.EnsuredTypes= text/xml

However, the link is blocked because in the "Response Embedded"cyle, the media type is not detected.

List.OfMediaType.IsEmpty(MediaType.EnsuredTypes) = true

Could someone explain me what is happening here ?

2018-11-20 15_49_47-McAfee Web Gateway.png

I've read about Composite Opener, Embedded cycles etc, but I cannot find a logic reason why media type is not detected


3 Replies
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 4

Re: media type not detected in embedded cycle


Hope you are doing well.

Media type ensured is better. MWG has a list of byte sequences and other matching criteria that allows it to make a guess at the file type. Generally it's pretty good. However there are two concerns with it. One is that it is a guess. If the probability is over 70% we list it otherwise, there is nothing. Many formats are notoriously difficult as they have no set format. Txt files are a good example of a file that may or may not have a probability over 70%. The second issue is that mediatype.ensured is a list instead of a single answer, as more than one format could be probable. This means that you could end up with a number of mediatypes listed.


If possible can you provide the link for me to test the behavior at my end?



Alok Sarda

Level 7
Report Inappropriate Content
Message 3 of 4

Re: media type not detected in embedded cycle


thanks for the quick reply.

What is strange for me is: the EnsureType is detected in the Response cycle, but for the same file the EnsureType is not detected in ResponseEmbedded cycle.

However, it's the same file.

here are the links:



Level 7
Report Inappropriate Content
Message 4 of 4

Re: media type not detected in embedded cycle


after some more troubleshooting, I've managed to see the blocking page

where I saw this messag:

File Name: database_2.xml|xml-base64-text-obj-917566892

So there is some base64 encoded data in that XML that is starting the Embedded cycle. (this answer to my question why having Embedded Cycle for XML file)

Now, as you said, EnsuredType is not 100% reliable. This explain missing the base64 type detection.


OK. I've tested with PDF file and managed to reproduce the same error - MediaType not detected in Embedded Cycle.

File Name: test.pdf|pdf-obj-109-0.dat|xml-base64-attribute-obj-706600083


My question is: what is the best practice ? how to configure MWG for this situations ?


You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community