Trying to fix Python 3 compatibility with the HTTP layer