]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Requests now send the Content-Type in the HTTP request
authorTyler Smith <tylesmit@cisco.com>
Tue, 2 Aug 2011 19:27:47 +0000 (12:27 -0700)
committerTyler Smith <tylesmit@cisco.com>
Tue, 2 Aug 2011 19:27:47 +0000 (12:27 -0700)
quantum/client.py

index eaced5d9d209a306a71147bf5a0f6f103d6376bd..ca05236faaec0a621bff28e8d3f74bf4c16bd2ef 100644 (file)
@@ -120,7 +120,8 @@ class Client(object):
 
         try:
             connection_type = self.get_connection_type()
-            headers = headers or {}
+            headers = headers or {"Content-Type":
+                                      "application/%s" % self.format}
 
             # Open connection and send request, handling SSL certs
             certs = {'key_file': self.key_file, 'cert_file': self.cert_file}