Made mimetype negotiation much more spec compliant