filemanager: do not respond again
This commit is contained in:
@@ -41,8 +41,9 @@ function proxy(kind) {
|
||||
|
||||
const sftpReq = http.request(opts, function (sftpRes) {
|
||||
res.writeHead(sftpRes.statusCode, sftpRes.headers);
|
||||
sftpRes.on('error', (error) => next(new HttpError(500, `filemanager error: ${error.message} ${error.code}`)));
|
||||
sftpRes.on('end', () => next());
|
||||
// note: these are intentionally not handled. response has already been written. do not forward to connect-lastmile
|
||||
// sftpRes.on('error', (error) => next(new HttpError(500, `filemanager error: ${error.message} ${error.code}`)));
|
||||
// sftpRes.on('end', () => next());
|
||||
sftpRes.pipe(res);
|
||||
});
|
||||
sftpReq.on('error', (error) => next(new HttpError(424, `Unable to connect to filemanager: ${error.message} ${error.code}`)));
|
||||
|
||||
Reference in New Issue
Block a user