summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2021-11-12 11:21:58 -0800
committerBert Belder <bertbelder@gmail.com>2021-11-17 15:34:41 -0800
commit6a797f7ba97eb10dba826a4b25eb3f3acbfe44cb (patch)
tree1cd4973ac04ebb5980921e71e6392d8125848b1d
parentc4c8543d5cf8b719ffe8451532fee35c7ba35f4d (diff)
chore(ext/http): deno fmt (#12798)
-rw-r--r--ext/http/01_http.js27
1 files changed, 10 insertions, 17 deletions
diff --git a/ext/http/01_http.js b/ext/http/01_http.js
index 94f1a1051..7620d154a 100644
--- a/ext/http/01_http.js
+++ b/ext/http/01_http.js
@@ -64,10 +64,7 @@
async nextRequest() {
let nextRequest;
try {
- nextRequest = await core.opAsync(
- "op_http_accept",
- this.#rid,
- );
+ nextRequest = await core.opAsync("op_http_accept", this.#rid);
} catch (error) {
this.close();
// A connection error seen here would cause disrupted responses to throw
@@ -93,12 +90,7 @@
return null;
}
- const [
- streamRid,
- method,
- headersList,
- url,
- ] = nextRequest;
+ const [streamRid, method, headersList, url] = nextRequest;
SetPrototypeAdd(this.managedResources, streamRid);
/** @type {ReadableStream<Uint8Array> | undefined} */
@@ -202,15 +194,16 @@
} else {
respBody = new Uint8Array(0);
}
- const isStreamingResponseBody =
- !(typeof respBody === "string" || respBody instanceof Uint8Array);
+ const isStreamingResponseBody = !(
+ typeof respBody === "string" || respBody instanceof Uint8Array
+ );
try {
- await core.opAsync("op_http_write_headers", [
- streamRid,
- innerResp.status ?? 200,
- innerResp.headerList,
- ], isStreamingResponseBody ? null : respBody);
+ await core.opAsync(
+ "op_http_write_headers",
+ [streamRid, innerResp.status ?? 200, innerResp.headerList],
+ isStreamingResponseBody ? null : respBody,
+ );
} catch (error) {
const connError = httpConn[connErrorSymbol];
if (error instanceof BadResource && connError != null) {