Skip to content

Commit

Permalink
fixes issue infobloxopen#365
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiguru committed Apr 12, 2023
1 parent a6fba80 commit f91c8e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion infoblox_client/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,10 @@ def _get_object(self, obj_type, url):
def download_file(self, url):
if self.session.cookies:
self.session.auth = None
ibapauth_cookie = self.session.cookies.get('ibapauth')
req_cookies = {'ibapauth': ibapauth_cookie}
headers = {'content-type': 'application/force-download'}
r = self.session.get(url, headers=headers)
r = self.session.get(url, headers=headers, cookies=req_cookies)
if r.status_code != requests.codes.ok:
response = utils.safe_json_load(r.content)
raise ib_ex.InfobloxFileDownloadFailed(
Expand Down

0 comments on commit f91c8e6

Please sign in to comment.