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

feat: Set user agent for http client #2916

Merged
merged 3 commits into from Sep 11, 2019

Conversation

@bartlomieju
Copy link
Contributor

commented Sep 11, 2019

Closes #2900

@kitsonk

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

Test?

fix
@bartlomieju

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

Test?

I'm writing it now 😂

EDIT: @kitsonk test added

headers.insert(
USER_AGENT,
format!("Deno/{}", version::DENO).parse().unwrap(),
);

This comment has been minimized.

Copy link
@ry

ry Sep 11, 2019

Collaborator

This prevents reqwest from sending its own user agent? did you check that there are not two user agent header lines?

This comment has been minimized.

Copy link
@bartlomieju

bartlomieju Sep 11, 2019

Author Contributor

Yes, I dumped headers in echo server:

'user-agent: Deno/0.17.0\r\naccept: */*\r\naccept-encoding: gzip\r\nhost: localhost:4545\r\ncontent-length: 11\r\n'

There's only single user-agent header.

@ry
ry approved these changes Sep 11, 2019
Copy link
Collaborator

left a comment

LGTM

@ry ry merged commit 85c5140 into denoland:master Sep 11, 2019
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla Contributor License Agreement is signed.
Details
@bartlomieju bartlomieju deleted the bartlomieju:patch-5 branch Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.