mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
9eb8743014
[CE/SP] Hotfix 4.1.6 GitOrigin-RevId: dc023665d5e0868913eff2104de1acaf7038cb9f
49 lines
2.1 KiB
Diff
49 lines
2.1 KiB
Diff
diff --git a/node_modules/teeny-request/build/src/index.js b/node_modules/teeny-request/build/src/index.js
|
|
index f209888..e9fe982 100644
|
|
--- a/node_modules/teeny-request/build/src/index.js
|
|
+++ b/node_modules/teeny-request/build/src/index.js
|
|
@@ -166,27 +166,27 @@ function teenyRequest(reqOpts, callback) {
|
|
}
|
|
if (callback === undefined) {
|
|
// Stream mode
|
|
- const requestStream = streamEvents(new stream_1.PassThrough());
|
|
+ const requestStream = new stream_1.PassThrough();
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
- let responseStream;
|
|
- requestStream.once('reading', () => {
|
|
- if (responseStream) {
|
|
- responseStream.pipe(requestStream);
|
|
- }
|
|
- else {
|
|
- requestStream.once('response', () => {
|
|
- responseStream.pipe(requestStream);
|
|
- });
|
|
- }
|
|
- });
|
|
+ // let responseStream;
|
|
+ // requestStream.once('reading', () => {
|
|
+ // if (responseStream) {
|
|
+ // responseStream.pipe(requestStream);
|
|
+ // }
|
|
+ // else {
|
|
+ // requestStream.once('response', () => {
|
|
+ // responseStream.pipe(requestStream);
|
|
+ // });
|
|
+ // }
|
|
+ // });
|
|
options.compress = false;
|
|
teenyRequest.stats.requestStarting();
|
|
node_fetch_1.default(uri, options).then(res => {
|
|
- teenyRequest.stats.requestFinished();
|
|
- responseStream = res.body;
|
|
- responseStream.on('error', (err) => {
|
|
- requestStream.emit('error', err);
|
|
- });
|
|
+ teenyRequest.stats.requestFinished(); stream_1.pipeline(res.body, requestStream, () => {});
|
|
+ // responseStream = res.body;
|
|
+ // responseStream.on('error', (err) => {
|
|
+ // requestStream.emit('error', err);
|
|
+ // });
|
|
const response = fetchToRequestResponse(options, res);
|
|
requestStream.emit('response', response);
|
|
}, err => {
|