-
Notifications
You must be signed in to change notification settings - Fork 321
Back to empty user agent #2294
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
Back to empty user agent #2294
Conversation
6b0af9c
to
f7927be
Compare
@@ -140,6 +140,10 @@ object CacheUrl { | |||
// handling those ourselves, so that we can update credentials upon redirection | |||
conn0.setInstanceFollowRedirects(false) | |||
|
|||
// Early in the development of coursier, I ran into some repositories (Sonatype ones?) not | |||
// returning the same content for user agent "Java/…". | |||
conn0.setRequestProperty("User-Agent", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make
conn0.setRequestProperty("User-Agent", "") | |
conn0.setRequestProperty("User-Agent", "Coursier") |
As initially proposed in #2246?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curl test says "Coursier"
would work too
$ curl -H "User-Agent: Coursier" https://oss.sonatype.org/content/repositories/snapshots/org/zeromq/jeromq/0.5.3-SNAPSHOT/maven-metadata.xml
so I am happy with either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm going to cut a release with an empty user agent (former behavior), then one with a Coursier
user agent. So that we can switch back to the other if the Coursier
user agent ends up having issues too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🙏
See discussion in coursier#2287 This reverts commit b7355f5.
f7927be
to
391898b
Compare
Fixes #2287.