fix(xen-api/putResource): use agent for both requests (#6261)

Fixes #6260
This commit is contained in:
tkrafael
2022-06-07 14:33:33 -03:00
committed by GitHub
parent 877383ac85
commit f88f7d41aa
2 changed files with 4 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [New SR] Fix `method.startsWith is not a function` when creating an _ext_ SR
- Import VDI content now works when there is a HTTP proxy between XO and the host (PR [#6261](https://github.com/vatesfr/xen-orchestra/pull/6261))
### Packages to release
@@ -29,6 +30,7 @@
<!--packages-start-->
- xen-api patch
- xo-cli minor
- @xen-orchestra/xapi minor
- xo-server minor

View File

@@ -465,6 +465,8 @@ export class Xapi extends EventEmitter {
await this._setHostAddressInUrl(url, host)
const doRequest = httpRequest.put.bind(undefined, $cancelToken, {
agent: this.httpAgent,
body,
headers,
rejectUnauthorized: !this._allowUnauthorized,
@@ -486,7 +488,6 @@ export class Xapi extends EventEmitter {
query: 'task_id' in query ? omit(query, 'task_id') : query,
maxRedirects: 0,
agent: this.httpAgent,
}).then(
response => {
response.cancel()