fix for content-type bug, plus removed use of SynapseMalformedEntityError from utils to avoid circular dependency