diff options
Diffstat (limited to 'std/http')
-rwxr-xr-x | std/http/file_server.ts | 4 | ||||
-rw-r--r-- | std/http/server.ts | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/std/http/file_server.ts b/std/http/file_server.ts index 66babfd57..d9ed56236 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -135,7 +135,9 @@ async function serveDir( let fileInfo = null; try { fileInfo = await stat(filePath); - } catch (e) {} + } catch (e) { + // Pass + } listEntry.push({ mode: modeToString(entry.isDirectory, fileInfo?.mode ?? null), size: entry.isFile ? fileLenToString(fileInfo?.size ?? 0) : "", diff --git a/std/http/server.ts b/std/http/server.ts index 18bfc4731..d2736cb43 100644 --- a/std/http/server.ts +++ b/std/http/server.ts @@ -90,7 +90,9 @@ export class ServerRequest { try { // Eagerly close on error. this.conn.close(); - } catch {} + } catch { + // Pass + } err = e; } // Signal that this request has been processed and the next pipelined @@ -108,7 +110,9 @@ export class ServerRequest { // Consume unread body const body = this.body; const buf = new Uint8Array(1024); - while ((await body.read(buf)) !== null) {} + while ((await body.read(buf)) !== null) { + // Pass + } this.finalized = true; } } |