Fix middleware response.content types for python3

A simple quickwin :)