feature: sol004 and sol007
[osm/osmclient.git] / osmclient / sol005 / package.py
index 1fa0e24..79125d8 100644 (file)
@@ -94,7 +94,11 @@ class Package(object):
             # endpoint = '/nsds' if pkg_type['type'] == 'nsd' else '/vnfds'
             # print('Endpoint: {}'.format(endpoint))
             headers = self._client._headers
-            headers["Content-Type"] = "application/gzip"
+
+            if filename.endswith(".tar.gz"):
+                headers["Content-Type"] = "application/gzip"
+            else:
+                headers["Content-Type"] = "application/zip"
             # headers['Content-Type'] = 'application/binary'
             # Next three lines are to be removed in next version
             # headers['Content-Filename'] = basename(filename)