Merge pull request #12936 from s1monw/add_build_hash_to_headers
Add build short hash to the download manager headers to identify staging builds
This commit is contained in:
commit
e5134317be
|
@ -360,10 +360,11 @@ public class HttpDownloadHelper {
|
|||
|
||||
if (connection instanceof HttpURLConnection) {
|
||||
((HttpURLConnection) connection).setInstanceFollowRedirects(false);
|
||||
((HttpURLConnection) connection).setUseCaches(true);
|
||||
((HttpURLConnection) connection).setConnectTimeout(5000);
|
||||
connection.setUseCaches(true);
|
||||
connection.setConnectTimeout(5000);
|
||||
}
|
||||
connection.setRequestProperty("ES-Version", Version.CURRENT.toString());
|
||||
connection.setRequestProperty("ES-Build-Hash", Build.CURRENT.hashShort());
|
||||
connection.setRequestProperty("User-Agent", "elasticsearch-plugin-manager");
|
||||
|
||||
// connect to the remote site (may take some time)
|
||||
|
|
Loading…
Reference in New Issue