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

Allow embedders to provide user agent string #25646

Closed
jdm opened this issue Jan 30, 2020 · 7 comments
Closed

Allow embedders to provide user agent string #25646

jdm opened this issue Jan 30, 2020 · 7 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Jan 30, 2020

It should be up to the embedder to decide what user agent to report in network requests, rather than deep in the engine in

fn default_user_agent_string(agent: UserAgent) -> &'static str {
(and #25372 would have exacerbated this). We should add a method to the EmbedderMethods trait that returns the default user agent string, so that we can pass that to the new network thread when we're creating an instance of Servo.

@highfive
Copy link

@highfive highfive commented Jan 30, 2020

Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the #servo channel in IRC.

If you intend to work on this issue, then add @highfive: assign me to your comment, and I'll assign this to you. 😄

@mediremi
Copy link
Contributor

@mediremi mediremi commented Feb 1, 2020

@highfive: assign me

@highfive highfive added the C-assigned label Feb 1, 2020
@highfive
Copy link

@highfive highfive commented Feb 1, 2020

Hey @medimatrix! Thanks for your interest in working on this issue. It's now assigned to you!

@mediremi mediremi mentioned this issue Feb 1, 2020
3 of 5 tasks complete
@utsavoza
Copy link
Contributor

@utsavoza utsavoza commented Apr 3, 2020

@jdm @medimatrix Is it possible for me to take up this issue if we are not making progress on it currently?

@jdm
Copy link
Member Author

@jdm jdm commented Apr 3, 2020

@utsavoza If you would like to continue the work from #25672, that would be great!

@utsavoza
Copy link
Contributor

@utsavoza utsavoza commented Apr 3, 2020

Sure. I have made some changes taking into account both the reviews and changes in #25672. I can raise a PR for the issue, if that's Ok!

@jdm
Copy link
Member Author

@jdm jdm commented Apr 3, 2020

Please do!

bors-servo added a commit that referenced this issue Apr 6, 2020
Extract user_agent from global opts and allow embedder to provide user agent string

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25646
- [x] These changes do not require tests because these are refactoring changes and I'm assuming that existing tests cover these changes.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this issue Apr 6, 2020
Extract user_agent from global opts and allow embedder to provide user agent string

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25646
- [x] These changes do not require tests because these are refactoring changes and I'm assuming that existing tests cover these changes.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this issue Apr 6, 2020
Extract user_agent from global opts and allow embedder to provide user agent string

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25646
- [x] These changes do not require tests because these are refactoring changes and I'm assuming that existing tests cover these changes.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo bors-servo closed this in 2fcd5fd Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.