-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: http-request-plugin
-
None
-
Environment:http-request-plugin 1.14
When utilizing httpRequest with an httpProxy defined along with proxyAuthentication
httpRequest(url: "https://mytarget.contoso.com", httpProxy: 'http://my.authenticated.proxy.com:8080', proxyAuthentication: 'CREDENTIALS' )
The plugin currently creates a request that defines an basic Authorization header with the values inside.
Authorization: Basic Rk9POkJBUg==
The proxy does not know what to do with this and responds with a 407 challenge back.
If I perform the same request utilizing curl I can see that it is constructing a Proxy-Authorization header that the proxy accepts and allows the traffic through.
withCredentials([usernamePassword(credentialsId: 'CREDENTIALS', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) {Â sh (returnStdout: true, script: "curl -U "$USERNAME:$PASSWORD" -x http://my.authenticated.proxy.com:8080 -s -L https://mytarget.contoso.com")}
Proxy-Authorization: Basic Rk9POkJBUg==
Â