X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fnsd.py;h=2fb5859accddd328d29bede827a1571d7bb81f00;hb=refs%2Fchanges%2F14%2F13614%2F1;hp=7c2925275b2444a2a68192adcab91038e4c02846;hpb=95686bbc69ded243c346f94dceb0bee567572fb7;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/nsd.py b/osmclient/sol005/nsd.py index 7c29252..2fb5859 100644 --- a/osmclient/sol005/nsd.py +++ b/osmclient/sol005/nsd.py @@ -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