Add the X-Detect-Content-Type request header

Also, fixed issues with a nested entity
&name; inside another entity (build failed)

Closes-Bug: #1274988

Change-Id: I06d0efeb88287182f0f04574f68039e6294fc40a
author: diane fleming
Merge "Add the X-Detect-Content-Type request header"