-
Bug
-
Resolution: Unresolved
-
Blocker
-
Jenkins 2.249.3, HTTP Request Plugin 1.8.27
Hi,
I'm trying to make an http request throught a proxy which need authentification.
This code is OK :
withEnv(['http_proxy=http://<usr>:<pwd>@myproxy.com:8080']) { sh "curl -sS -w '\n%{http_code}' http://httpbin.org/get" }
But this one is KO :
=> Connection time out
withEnv(['http_proxy=http://<usr>:<pwd>@myproxy.com:8080']) { httpRequest( url: 'http://httpbin.org/get', timeout: 10, httpProxy: env.http_proxy, ) }
Neither this one :
=> Treating UnknownHostException(***:***@myproxy.com: Name or service not known) as 404 Not Found
httpRequest( url: 'http://httpbin.org/get', httpProxy: 'http://<usr>:<pwd>@myproxy.com:8080' timeout: 10, httpProxy: env.http_proxy, )
[JENKINS-64397] Plugin don't work with authentificated proxy
Description |
Original:
Hi,
I'm trying to make an http request throught a proxy which need authentification. This code is OK : {code:groovy} withEnv(['http_proxy=http://<usr>:<pwd>@myproxy.com:8080']) { sh "curl -sS -w '\n%{http_code}' http://httpbin.org/get" } {code} But this one is KO : {quote}=> Connection time out {quote} {code:groovy} withEnv(['http_proxy=http://<usr>:<pwd>@myproxy.com:8080']) { httpRequest( url: 'http://httpbin.org/get', timeout: 10, httpProxy: Pipeline.getEnv('http_proxy'), ) } {code} Neither this one : {quote}=> Treating UnknownHostException(****:****@myproxy.com: Name or service not known) as 404 Not Found {quote} {code:groovy} httpRequest( url: 'http://httpbin.org/get', httpProxy: 'http://<usr>:<pwd>@myproxy.com:8080' timeout: 10, httpProxy: Pipeline.getEnv('http_proxy'), ) {code} |
New:
Hi,
I'm trying to make an http request throught a proxy which need authentification. This code is OK : {code:groovy} withEnv(['http_proxy=http://<usr>:<pwd>@myproxy.com:8080']) { sh "curl -sS -w '\n%{http_code}' http://httpbin.org/get" } {code} But this one is KO : {quote}=> Connection time out {quote} {code:groovy} withEnv(['http_proxy=http://<usr>:<pwd>@myproxy.com:8080']) { httpRequest( url: 'http://httpbin.org/get', timeout: 10, httpProxy: env.http_proxy, ) } {code} Neither this one : {quote}=> Treating UnknownHostException(****:****@myproxy.com: Name or service not known) as 404 Not Found {quote} {code:groovy} httpRequest( url: 'http://httpbin.org/get', httpProxy: 'http://<usr>:<pwd>@myproxy.com:8080' timeout: 10, httpProxy: env.http_proxy, ) {code} |