-
Notifications
You must be signed in to change notification settings - Fork 62
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
Should _http_request
only close streams it has created?
#468
Comments
Copied my response from JuliaWeb/HTTP.jl#772 (comment) as it is relevant here:
|
Care to make a PR? I think it's roughly Fredrik's suggested diff (#467 (comment)) plus a test that user-given IO-streams do not get closed? |
Sure. I'll be rolling it into #384 as I need to update it to not break the current behaviour and then this change can be opt-in |
384: Use `AWS.Response` to handle streaming/raw/parsing r=omus a=omus The idea is to use a struct in AWS.jl that can be used to handle the automatic parsing that is currently used to turn XML/JSON into a dict while also giving the option of accessing the raw output as a string or stream without all the keywords currently needed to be specified. Depends on: - #457 Related: - #346 - #348 - #438 Closes: - #224 - #433 - #468 (when using `use_response_type` the passed in I/O is not closed) - #471 - #433 Update: The tests in this PR run using the deprecated behaviour. Mainly I did that here to prove this change is non-breaking. For the updated tests see #458 Co-authored-by: Curtis Vogt <curtis.vogt@gmail.com>
As of AWS.jl 1.63.0 (#384) streams are no longer closed when using the feature When not enabling the |
Follow up to #467 (comment) (see also #433)
Roughly, HTTP.jl v0.9.15 changed to not
close
streams withinHTTP.request
(see JuliaWeb/HTTP.jl#752, JuliaWeb/HTTP.jl#543, JuliaWeb/HTTP.jl#772).Here in AWS.jl, we were relying on the previous HTTP behaviour of calling
close
on theresponse_stream
, so #467 reintroduces theclose
in our internalAWS._http_request
helper.But this was done as simplest way to get back to the previous HTTP behaviour. We might instead want to re-evaluate indiscriminately calling
close
on the stream, which a user could have providedThe text was updated successfully, but these errors were encountered: