Skip to content

Commit

Permalink
Fix incorrect response header content-type reading (#48)
Browse files Browse the repository at this point in the history
* fix incorrect response header content-type reading

* case insensitive
  • Loading branch information
NeroBlackstone committed Jul 28, 2023
1 parent f923121 commit 522fc2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest.toml
.vscode
2 changes: 1 addition & 1 deletion src/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ end

function header(resp::Downloads.Response, name::AbstractString, defaultval::AbstractString)
for (n,v) in resp.headers
(n == name) && (return v)
(lowercase(n) == lowercase(name)) && (return v)
end
return defaultval
end
Expand Down

0 comments on commit 522fc2d

Please sign in to comment.