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==
Originally reported by
jakauppila, imported from: When specifying proxyAuthentication, plugin creates an Authorization header instead of a Proxy-Authorization header
- assignee:
janario
- status: Open
- priority: Major
- component(s): http-request-plugin
- resolution: Unresolved
- votes: 1
- watchers: 2
- imported: 20260702-081740
Raw content of original issue
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==
- 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.
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.
Originally reported by
jakauppila, imported from: When specifying proxyAuthentication, plugin creates an Authorization header instead of a Proxy-Authorization header
Raw content of original issue
http-request-plugin 1.14