Fix pip requirements to update pyangbind version to 0.8.3.post1
[osm/osmclient.git] / osmclient / sol005 / nsd.py
index 7c29252..2fb5859 100644 (file)
@@ -152,6 +152,8 @@ class Nsd(object):
                 headers["Content-Type"] = "text/plain"
             elif mime_type in ["application/gzip", "application/x-gzip"]:
                 headers["Content-Type"] = "application/gzip"
+            elif mime_type in ["application/zip"]:
+                headers["Content-Type"] = "application/zip"
             else:
                 raise ClientException(
                     "Unexpected MIME type for file {}: MIME type {}".format(
@@ -159,10 +161,7 @@ class Nsd(object):
                     )
                 )
             headers["Content-File-MD5"] = utils.md5(filename)
-            http_header = [
-                "{}: {}".format(key, val) for (key, val) in list(headers.items())
-            ]
-            self._http.set_http_header(http_header)
+            self._http.set_http_header(headers)
             if update_endpoint:
                 http_code, resp = self._http.put_cmd(
                     endpoint=update_endpoint, filename=filename