diff options
author | bobzel <zzzman@gmail.com> | 2023-09-10 15:58:09 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-09-10 15:58:09 -0400 |
commit | 6499ac4b30c8f6ada2b0c7d74cd5f2a73f9bf180 (patch) | |
tree | a6262cc5fad835bd8ea8a4e2c68633885866b559 /src/server/server_Initialization.ts | |
parent | 942669b287a8aacc3f4c803beb450a7e3ae8b565 (diff) |
fixes for file uploads: restored progress for youtube videos, fixed info display on loadingBoxes, stop client from asking for progress on failed uploads. attempt to catch stream errors on webpages. fixed dataFieldView in text to print out layout document's field, not field of document that contains the field definition.
Diffstat (limited to 'src/server/server_Initialization.ts')
-rw-r--r-- | src/server/server_Initialization.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/server/server_Initialization.ts b/src/server/server_Initialization.ts index 64f90d76c..839091194 100644 --- a/src/server/server_Initialization.ts +++ b/src/server/server_Initialization.ts @@ -194,14 +194,20 @@ function proxyServe(req: any, requrl: string, response: any) { .replace(/target="_blank"/g, ''); response.send(header?.includes('gzip') ? zlib.gzipSync(htmlText) : htmlText); } else { - req.pipe(request(requrl)).pipe(response); + req.pipe(request(requrl)) + .on('error', (e: any) => console.log('requrl ', e)) + .pipe(response) + .on('error', (e: any) => console.log('response pipe error', e)); console.log('EMPTY body:' + req.url); } } catch (e) { console.log('ERROR?: ', e); } } else { - req.pipe(htmlBodyMemoryStream).pipe(response); + req.pipe(htmlBodyMemoryStream) + .on('error', (e: any) => console.log('html body memorystream error', e)) + .pipe(response) + .on('error', (e: any) => console.log('html body memory stream response error', e)); } }; const retrieveHTTPBody = () => { @@ -237,7 +243,8 @@ function proxyServe(req: any, requrl: string, response: any) { response.headers = response._headers = res.headers; }) .on('end', sendModifiedBody) - .pipe(htmlBodyMemoryStream); + .pipe(htmlBodyMemoryStream) + .on('error', (e: any) => console.log('http body pipe error', e)); }; retrieveHTTPBody(); } |