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

naost3rn commented Jan 16, 2020

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

This comment has been minimized.

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 ?

@bagder
bagder approved these changes Jan 17, 2020
Copy link
Member

bagder left a comment

Nice!

@bagder

This comment has been minimized.

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
naost3rn added 5 commits Jan 15, 2020
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
@naost3rn naost3rn force-pushed the naost3rn:fix_oauth_bearer branch from bfc64eb to ac3dbcb Jan 20, 2020
@bagder

This comment has been minimized.

Copy link
Member

bagder commented Jan 21, 2020

Thanks!

@bagder bagder closed this in dea17b5 Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.