Fix a long standing bug where HTTP HEAD requests resulted in a 400 error.