Skip to content

Conversation

@zekroTJA
Copy link
Member

Because the Request RoundTripper closes passed body streams if they implement io.Close, seeking the body on re-trying the request after an authentication error fails because the body stream is already closed.

This implementation prevents the RoudTripper from closing the body so we can postpone the closing until we are done with the body stream.

@chripo
Copy link
Member

chripo commented Jan 28, 2022

i think this could lead to multiple close calls / undefined behavior because we do recursion due to authentication errors.

@chripo
Copy link
Member

chripo commented Jan 28, 2022

#15 is a long thorn in my side :)

@chripo
Copy link
Member

chripo commented Feb 3, 2023

I've made some progress on #15 this will hopefully close this issue too.

@chripo
Copy link
Member

chripo commented Jun 22, 2023

if the issue still present, we could continue on top of master.

@ueffel
Copy link
Collaborator

ueffel commented Oct 18, 2023

btw: there is already io.NopCloser in the stdlib. No need to reinvent it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants