Fix middleware response.content types for python3