#31 Content type and length switching rules

Provides a patch to work around a bug in the built in PHP server.