#21906 closed defect (fixed)
[PATCH] Properly use user set User-Agent header
Reported by: | taylor.smock | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin http2 | Version: | |
Keywords: | Cc: |
Description
The attached patch ensures that only one user agent string is added to the request. This brings the HTTP2 client into feature parity with our HTTP1 client. It also implements Destroyable in the plugin main class.
I am, however, a bit ambivalent about the patch. A user initially reported this on the OSM World Discord server w.r.t. to non-default imagery. They did claim to have received permissions to use that imagery in OSM, but there were some additional restrictions w.r.t. nationality of the person using the imagery to do the mapping.
Options:
- Apply the patch as is
- Modify Http1Client so that users cannot override the User-Agent string
Either way, our handling of user-set User-Agent strings should be consistent.
Attachments (1)
Change History (5)
by , 2 years ago
Attachment: | 21906.patch added |
---|
comment:1 by , 2 years ago
Overriding user agent is sometimes a necessity. It shouldn't be easy for the average user, but it should be possible.
comment:2 by , 2 years ago
I kind of figured that would be the case. I'll go ahead and apply the patch and do a release once I get in to the office.
Only add
User-Agent
to the request headers once, preferring the user set User-Agent string, if any. Also implement Destroyable in the Plugin main class.