Skip to content

Commit

Permalink
fix #72 change gbif_GET_write internal fxn to be more liberal in stri…
Browse files Browse the repository at this point in the history
…ng matching content type
  • Loading branch information
sckott committed Sep 23, 2020
1 parent f6edb5a commit 3c366f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pygbif/gbifutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def gbif_GET_write(url, path, **kwargs):
for chunk in out.iter_content(chunk_size=1024):
if chunk:
f.write(chunk)
ctype = "application/octet-stream; qs=0.5"
if out.headers["content-type"] != ctype:
raise NoResultException("content-type did not = '%s'" % ctype)
ctype = "application/octet-stream"
if not re.match(ctype, out.headers["content-type"]):
raise NoResultException("content-type did not contain '%s'" % ctype)
return path


Expand Down

0 comments on commit 3c366f8

Please sign in to comment.