Check if Content-Type is set in response, first.

This allows the Django http test client to run correctly.
Merge branch 'fix_content_type_check' into localwiki

Conflicts:
	phased/middleware.py