summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNLR <nilsleroux@gmail.com>2018-06-01 14:32:10 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-06-01 14:32:10 +0000
commitdca702a599df033acd114e1d3eea52b2c82f4001 (patch)
tree30c67244fa310a85a5a4ea1fc682244696d6f364
parentc3450ab9eec31a525e3559520b8a010ed5c2c2e8 (diff)
downloadgitlab-ce-dca702a599df033acd114e1d3eea52b2c82f4001.tar.gz
Make http_io honor HTTP(S)_PROXY environment.
-rw-r--r--changelogs/unreleased/fix-http-proxy.yml5
-rw-r--r--lib/gitlab/ci/trace/http_io.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/fix-http-proxy.yml b/changelogs/unreleased/fix-http-proxy.yml
new file mode 100644
index 00000000000..806b7d0a38c
--- /dev/null
+++ b/changelogs/unreleased/fix-http-proxy.yml
@@ -0,0 +1,5 @@
+---
+title: Fixed HTTP_PROXY environment not honored when reading remote traces.
+merge_request: 19282
+author: NLR
+type: fixed
diff --git a/lib/gitlab/ci/trace/http_io.rb b/lib/gitlab/ci/trace/http_io.rb
index cff924e27ef..8788af57a67 100644
--- a/lib/gitlab/ci/trace/http_io.rb
+++ b/lib/gitlab/ci/trace/http_io.rb
@@ -148,7 +148,7 @@ module Gitlab
def get_chunk
unless in_range?
- response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
+ response = Net::HTTP.start(uri.hostname, uri.port, proxy_from_env: true, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end