User-agent must contain (gzip).
http://stackoverflow.com/questions/7140035/http-server-not-honoring-accept-encoding-gzip-unless-user-agent-is-known-browse Reviewed in https://codereview.appspot.com/8288046/.
This commit is contained in:
		| @@ -141,7 +141,7 @@ class BaseModel(Model): | ||||
|       headers['user-agent'] += ' ' | ||||
|     else: | ||||
|       headers['user-agent'] = '' | ||||
|     headers['user-agent'] += 'google-api-python-client/' + __version__ | ||||
|     headers['user-agent'] += 'google-api-python-client/%s (gzip)' % __version__ | ||||
|  | ||||
|     if body_value is not None: | ||||
|       headers['content-type'] = self.content_type | ||||
|   | ||||
| @@ -140,7 +140,8 @@ class Model(unittest.TestCase): | ||||
|         headers, path_params, query_params, body) | ||||
|  | ||||
|     self.assertEqual(headers['user-agent'], | ||||
|         'my-test-app/1.23.4 google-api-python-client/' + __version__) | ||||
|         'my-test-app/1.23.4 google-api-python-client/' + __version__ + | ||||
|         ' (gzip)') | ||||
|  | ||||
|   def test_bad_response(self): | ||||
|     model = JsonModel(data_wrapper=False) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Joe Gregorio
					Joe Gregorio