urllib 3.27.0 → 3.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,7 +68,7 @@ class BlobFromStream {
68
68
  return 'Blob';
69
69
  }
70
70
  }
71
- exports.HEADER_USER_AGENT = (0, default_user_agent_1.default)('node-urllib', '3.27.0');
71
+ exports.HEADER_USER_AGENT = (0, default_user_agent_1.default)('node-urllib', '3.27.1');
72
72
  function getFileName(stream) {
73
73
  const filePath = stream.path;
74
74
  if (filePath) {
@@ -490,6 +490,8 @@ class HttpClient extends node_events_1.EventEmitter {
490
490
  // FIXME: merge exists cookie header
491
491
  requestOptions.headers.cookie = response.headers['set-cookie'].join(';');
492
492
  }
493
+ // Ensure the previous response is consumed as we re-use the same variable
494
+ await response.body.arrayBuffer();
493
495
  response = await (0, undici_1.request)(requestUrl, requestOptions);
494
496
  }
495
497
  }
@@ -62,7 +62,7 @@ class BlobFromStream {
62
62
  return 'Blob';
63
63
  }
64
64
  }
65
- export const HEADER_USER_AGENT = createUserAgent('node-urllib', '3.27.0');
65
+ export const HEADER_USER_AGENT = createUserAgent('node-urllib', '3.27.1');
66
66
  function getFileName(stream) {
67
67
  const filePath = stream.path;
68
68
  if (filePath) {
@@ -484,6 +484,8 @@ export class HttpClient extends EventEmitter {
484
484
  // FIXME: merge exists cookie header
485
485
  requestOptions.headers.cookie = response.headers['set-cookie'].join(';');
486
486
  }
487
+ // Ensure the previous response is consumed as we re-use the same variable
488
+ await response.body.arrayBuffer();
487
489
  response = await undiciRequest(requestUrl, requestOptions);
488
490
  }
489
491
  }
package/dist/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "urllib",
3
- "version": "3.27.0"
3
+ "version": "3.27.1"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "urllib",
3
- "version": "3.27.0",
3
+ "version": "3.27.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/HttpClient.ts CHANGED
@@ -581,6 +581,8 @@ export class HttpClient extends EventEmitter {
581
581
  // FIXME: merge exists cookie header
582
582
  requestOptions.headers.cookie = response.headers['set-cookie'].join(';');
583
583
  }
584
+ // Ensure the previous response is consumed as we re-use the same variable
585
+ await response.body.arrayBuffer();
584
586
  response = await undiciRequest(requestUrl, requestOptions as UndiciRequestOption);
585
587
  }
586
588
  }