Skip to content

Commit 5ebf8ca

Browse files
authored
Fix parsing body if it is empty (#664)
* patch version bump * Fix parsing body if it is empty
1 parent e668ac6 commit 5ebf8ca

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AWS"
22
uuid = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
33
license = "MIT"
4-
version = "1.90.3"
4+
version = "1.90.4"
55

66
[deps]
77
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

src/deprecated.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,15 @@ function legacy_response(
112112

113113
body_str = String(copy(body))
114114

115-
if occursin(r"/xml", mime)
115+
if isempty(body_str)
116+
return (
117+
if return_headers
118+
(nothing, response_dict_type(response.headers))
119+
else
120+
nothing
121+
end
122+
)
123+
elseif occursin(r"/xml", mime)
116124
if return_headers
117125
Base.depwarn(
118126
"The keyword `return_headers` is deprecated, " *

0 commit comments

Comments
 (0)