Fix AttributeError on missing Content-Type header