Skip to content

Commit

Permalink
Merge pull request #296 from ybasket/set-accept-header
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimush committed Feb 9, 2022
2 parents ef8e16c + da22165 commit 9f5d77b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/com/timushev/sbt/updates/Downloader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Downloader(repositoryId: String, authentications: Seq[RepositoryAuthentica
val connection = url.openConnection()
// Same as in org.apache.ivy.util.url.BasicURLHandler
connection.setRequestProperty("User-Agent", s"Apache Ivy/${Ivy.getIvyVersion}")
// Otherwise Java sets a default that is not accepted by all remote repositories (AWS CodeArtifact as an example)
connection.setRequestProperty("Accept", "*/*")
hostAuthentication match {
case Some(c) =>
logger.debug(s"Downloading $url as ${c.describe}")
Expand Down

0 comments on commit 9f5d77b

Please sign in to comment.