From 44efefbda6d30edc602257c1a2501259e7ef9626 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Sun, 28 Jul 2019 20:35:47 +0900 Subject: Ignore error of writing responses to aborted requests (denoland/deno_std#546) Original: https://github.com/denoland/deno_std/commit/826deb1012d3595c3f6de19659e13564a15ceda1 --- http/testdata/simple_server.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 http/testdata/simple_server.ts (limited to 'http/testdata') diff --git a/http/testdata/simple_server.ts b/http/testdata/simple_server.ts new file mode 100644 index 000000000..4f8b0e801 --- /dev/null +++ b/http/testdata/simple_server.ts @@ -0,0 +1,11 @@ +// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +// This is an example of a server that responds with an empty body +import { serve } from "../server.ts"; + +window.onload = async function main() { + const addr = "0.0.0.0:4502"; + console.log(`Simple server listening on ${addr}`); + for await (let req of serve(addr)) { + req.respond({}); + } +} -- cgit v1.2.3