Fixed tests for Python 2.6.
Fixed Content-Type retrieval for Python 3.