summaryrefslogtreecommitdiff
path: root/std/http/server.ts
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2020-07-14 15:24:17 -0400
committerGitHub <noreply@github.com>2020-07-14 15:24:17 -0400
commitcde4dbb35132848ffece59ef9cfaccff32347124 (patch)
treecc7830968c6decde704c8cfb83c9185193dc698f /std/http/server.ts
parent9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff)
Use dprint for internal formatting (#6682)
Diffstat (limited to 'std/http/server.ts')
-rw-r--r--std/http/server.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/std/http/server.ts b/std/http/server.ts
index b1ffed96b..93f116fff 100644
--- a/std/http/server.ts
+++ b/std/http/server.ts
@@ -65,7 +65,7 @@ export class ServerRequest {
.map((e): string => e.trim().toLowerCase());
assert(
parts.includes("chunked"),
- 'transfer-encoding must include "chunked" if content-length is not set'
+ 'transfer-encoding must include "chunked" if content-length is not set',
);
this._body = chunkedBodyReader(this.headers, this.r);
} else {
@@ -136,7 +136,7 @@ export class Server implements AsyncIterable<ServerRequest> {
// Yields all HTTP requests on a single TCP connection.
private async *iterateHttpRequests(
- conn: Deno.Conn
+ conn: Deno.Conn,
): AsyncIterableIterator<ServerRequest> {
const reader = new BufReader(conn);
const writer = new BufWriter(conn);
@@ -203,7 +203,7 @@ export class Server implements AsyncIterable<ServerRequest> {
// same kind and adds it to the request multiplexer so that another TCP
// connection can be accepted.
private async *acceptConnAndIterateHttpRequests(
- mux: MuxAsyncIterator<ServerRequest>
+ mux: MuxAsyncIterator<ServerRequest>,
): AsyncIterableIterator<ServerRequest> {
if (this.closing) return;
// Wait for a new connection.
@@ -302,7 +302,7 @@ export function serve(addr: string | HTTPOptions): Server {
*/
export async function listenAndServe(
addr: string | HTTPOptions,
- handler: (req: ServerRequest) => void
+ handler: (req: ServerRequest) => void,
): Promise<void> {
const server = serve(addr);
@@ -359,7 +359,7 @@ export function serveTLS(options: HTTPSOptions): Server {
*/
export async function listenAndServeTLS(
options: HTTPSOptions,
- handler: (req: ServerRequest) => void
+ handler: (req: ServerRequest) => void,
): Promise<void> {
const server = serveTLS(options);