Skip to content
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

Fix a bug that oauth_bearer is deallocated when we re-use a connection #4824

Closed
wants to merge 5 commits into from

Conversation

naost3rn
Copy link
Contributor

get the Bearer token from the old_conn struct since it may be new for this request even when we re-use an existing connection

@bagder
Copy link
Member

bagder commented Jan 16, 2020

This made me think. Why do we store the 'bearer' in the connection anyway? Isn't the bearer rather per-transfer? I.e shouldn't it be moved from struct connectdata to struct Curl_easy ?

Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bagder
Copy link
Member

bagder commented Jan 20, 2020

The disable verbose build in travis failed:

I presume you need to make 'data' available in that function unconditionally.

http.c: In function ‘output_auth_headers’:
http.c:710:19: error: ‘data’ undeclared (first use in this function); did you mean ‘path’?
     if((!proxy && data->set.str[STRING_BEARER] &&
                   ^~~~
                   path

get the bearer information from the old_conn struct since
it may be new for this request even when we re-use an existing connection
remove oauth_bearer from struct connectdata and get the Bearer token from struct Curl_easy
@bagder
Copy link
Member

bagder commented Jan 21, 2020

Thanks!

@bagder bagder closed this in dea17b5 Jan 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

2 participants