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

CURLOPT_USERAGENT ignored when using CURL_IMPERSONATE env var #51

Closed
lwthiker opened this issue Apr 19, 2022 · 1 comment · Fixed by #96
Closed

CURLOPT_USERAGENT ignored when using CURL_IMPERSONATE env var #51

lwthiker opened this issue Apr 19, 2022 · 1 comment · Fixed by #96
Labels
bug Something isn't working

Comments

@lwthiker
Copy link
Owner

Reported originally by @momala454 in #42 :

i have a small problem with your pull request (actually, with the whole libcurl version). When i'm using CURL_IMPERSONATE=chrome98, i'm unable to overwrite the default user-agent header to Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36
it stays with Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

when I set CURLOPT_USERAGENT, it does not overwrite the default user-agent set with "CURL_IMPERSONATE" env variable. It only reset it if I modify the header "user-agent" using CURLOPT_HTTPHEADER

@lwthiker lwthiker added the bug Something isn't working label Apr 19, 2022
@lwthiker
Copy link
Owner Author

Fixed, using CURLOPT_USERAGENT while the CURL_IMPERSONATE env var is set will now work as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant