jenkinsci / jenkinsci/http-request-plugin

[JENKINS-64397] Plugin don't work with authentificated proxy

Open
#298 1 comment 0 reactions 0 assignees View on GitHub
component:http-request-plugin imported-jira-issue priority:blocker resolution:unresolved
Dominant language
Java
Stars
176
Forks
158
Avg merge
1d 16h
Merged PRs (30d)
3

Description

Hi,  

I'm trying to make an http request throught a proxy which need authentification.

This code is OK : 

withEnv(['http_proxy=http://:@​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://:@​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://:@​myproxy.com:8080'
timeout: 10,
httpProxy: env.http_proxy,
)

---
Originally reported by cpottiers, imported from: Plugin don't work with authentificated proxy


  • assignee: janario
  • status: Open
  • priority: Blocker
  • component(s): http-request-plugin
  • label(s): http-request, proxy
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20260702-081740

Raw content of original issue

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,
)

  • environment: Jenkins 2.249.3, HTTP Request Plugin 1.8.27

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.