This is weird. You are setting this `content_type` header twice. Once here, and once in the previous line where you call `_set_headers`.