-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return both body and header for all AWS requests #116
Conversation
bors try |
tryBuild succeeded: |
Good to go? |
He's on vacation. |
We can avoid a breaking change here. Instead, we could have an inner method that returns both, and have |
Maybe it's too early in the morning, but I'm not following how this wouldn't be a breaking change. At some point we need the functionality to return back the headers and not just the response body. |
A slight tweak on my original idea: Add a boolean Then this isn't a breaking change, and only the places that need to use the headers need to change. |
bors try |
tryBuild succeeded: |
0c32778
to
8de87ac
Compare
03fa742
to
8e4bd57
Compare
8e4bd57
to
900aeef
Compare
Co-Authored-By: Eric Davies <iamed2@gmail.com>
bors r+ |
Build succeeded: |
end | ||
|
||
# Return raw data by default... | ||
return response.body | ||
return (return_headers ? (response.body, nothing) : response.body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why nothing
here? This is the codepath I'm seeing AWSS3 take with your changes, resulting in:
MethodError: no method matching getindex(::Nothing, ::String)
Stacktrace:
[1] s3_upload_part(::Dict{Symbol,Any}, ::XMLDict.XMLDictElement, ::Int64, ::Array{UInt8,1}) at /home/keno/.julia/dev/AWSS3/src/AWSS3.jl:698
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #117 , I think the comment above it threw me off.
AWSS3.jl
is having issues where the multi-part upload is not working properly, it attempts to return request headers back as both thepart number
andetag
are required to successfully complete a multi-part upload.AWSCore.jl
currently does not return headers unless the operation is aHEAD
type request. This merge request returns back the responsebody
andheaders
for all requests, which accommodates for these requirements.This change will allow use to begin resolving AWSS3.jl #84.