<p dir="auto">Note the issue was only appearing on Windows. So ideally someone on Windows would debug this. The first set is to uncomment the tests and see if you can repeat the failure.</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/denoland/deno/blob/570269b73de713afcff712977d11a3910ed849ad/js/fetch_test.ts#L50-L161">deno/js/fetch_test.ts</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 50 to 161
      in
      <a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/570269b73de713afcff712977d11a3910ed849ad">570269b</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L50" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="50"></td>
          <td id="LC50" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// TODO(ry) The following tests work but are flaky. There's a race condition</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L51" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="51"></td>
          <td id="LC51" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// somewhere. Here is what one of these flaky failures looks like:</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L52" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="52"></td>
          <td id="LC52" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">//</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L53" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="53"></td>
          <td id="LC53" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// test fetchPostBodyString_permW0N1E0R0</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L54" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="54"></td>
          <td id="LC54" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// assertEqual failed. actual =   expected = POST /blah HTTP/1.1</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L55" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="55"></td>
          <td id="LC55" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// hello: World</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L56" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="56"></td>
          <td id="LC56" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// foo: Bar</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L57" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="57"></td>
          <td id="LC57" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// host: 127.0.0.1:4502</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L58" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="58"></td>
          <td id="LC58" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// content-length: 11</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L59" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="59"></td>
          <td id="LC59" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// hello world</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L60" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="60"></td>
          <td id="LC60" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// Error: actual:  expected: POST /blah HTTP/1.1</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L61" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="61"></td>
          <td id="LC61" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// hello: World</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L62" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="62"></td>
          <td id="LC62" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// foo: Bar</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L63" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="63"></td>
          <td id="LC63" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// host: 127.0.0.1:4502</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L64" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="64"></td>
          <td id="LC64" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// content-length: 11</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L65" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="65"></td>
          <td id="LC65" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// hello world</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L66" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="66"></td>
          <td id="LC66" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">//     at Object.assertEqual (file:///C:/deno/js/testing/util.ts:29:11)</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L67" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="67"></td>
          <td id="LC67" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">//     at fetchPostBodyString (file</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L68" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="68"></td>
          <td id="LC68" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">  </td>
        </tr>

        <tr class="border-0">
          <td id="L69" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="69"></td>
          <td id="LC69" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/* </span> </td>
        </tr>

        <tr class="border-0">
          <td id="L70" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="70"></td>
          <td id="LC70" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">function bufferServer(addr: string): deno.Buffer {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L71" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="71"></td>
          <td id="LC71" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const listener = deno.listen("tcp", addr);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L72" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="72"></td>
          <td id="LC72" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const buf = new deno.Buffer();</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L73" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="73"></td>
          <td id="LC73" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  listener.accept().then(async conn =&gt; {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L74" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="74"></td>
          <td id="LC74" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    const p1 = buf.readFrom(conn);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L75" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="75"></td>
          <td id="LC75" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    const p2 = conn.write(</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L76" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="76"></td>
          <td id="LC76" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">      new TextEncoder().encode(</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L77" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="77"></td>
          <td id="LC77" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">        "HTTP/1.0 404 Not Found\r\nContent-Length: 2\r\n\r\nNF"</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L78" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="78"></td>
          <td id="LC78" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">      )</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L79" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="79"></td>
          <td id="LC79" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    );</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L80" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="80"></td>
          <td id="LC80" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    // Wait for both an EOF on the read side of the socket and for the write to</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L81" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="81"></td>
          <td id="LC81" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    // complete before closing it. Due to keep-alive, the EOF won't be sent</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L82" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="82"></td>
          <td id="LC82" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    // until the Connection close (HTTP/1.0) response, so readFrom() can't</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L83" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="83"></td>
          <td id="LC83" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    // proceed write. Conversely, if readFrom() is async, waiting for the</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L84" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="84"></td>
          <td id="LC84" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    // write() to complete is not a guarantee that we've read the incoming</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L85" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="85"></td>
          <td id="LC85" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    // request.</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L86" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="86"></td>
          <td id="LC86" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    await Promise.all([p1, p2]);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L87" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="87"></td>
          <td id="LC87" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    conn.close();</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L88" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="88"></td>
          <td id="LC88" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    listener.close();</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L89" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="89"></td>
          <td id="LC89" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  });</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L90" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="90"></td>
          <td id="LC90" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  return buf;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L91" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="91"></td>
          <td id="LC91" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">}</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L92" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="92"></td>
          <td id="LC92" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L93" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="93"></td>
          <td id="LC93" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">testPerm({ net: true }, async function fetchRequest() {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L94" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="94"></td>
          <td id="LC94" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const addr = "127.0.0.1:4501";</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L95" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="95"></td>
          <td id="LC95" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const buf = bufferServer(addr);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L96" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="96"></td>
          <td id="LC96" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const response = await fetch(`http://${addr}/blah`, {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L97" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="97"></td>
          <td id="LC97" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    method: "POST",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L98" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="98"></td>
          <td id="LC98" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    headers: [["Hello", "World"], ["Foo", "Bar"]]</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L99" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="99"></td>
          <td id="LC99" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  });</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L100" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="100"></td>
          <td id="LC100" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(response.status, 404);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L101" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="101"></td>
          <td id="LC101" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(response.headers.get("Content-Length"), "2");</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L102" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="102"></td>
          <td id="LC102" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L103" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="103"></td>
          <td id="LC103" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const actual = new TextDecoder().decode(buf.bytes());</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L104" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="104"></td>
          <td id="LC104" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const expected = [</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L105" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="105"></td>
          <td id="LC105" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "POST /blah HTTP/1.1\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L106" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="106"></td>
          <td id="LC106" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "hello: World\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L107" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="107"></td>
          <td id="LC107" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "foo: Bar\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L108" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="108"></td>
          <td id="LC108" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    `host: ${addr}\r\n\r\n`</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L109" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="109"></td>
          <td id="LC109" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  ].join("");</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L110" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="110"></td>
          <td id="LC110" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(actual, expected);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L111" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="111"></td>
          <td id="LC111" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">});</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L112" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="112"></td>
          <td id="LC112" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L113" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="113"></td>
          <td id="LC113" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">testPerm({ net: true }, async function fetchPostBodyString() {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L114" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="114"></td>
          <td id="LC114" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const addr = "127.0.0.1:4502";</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L115" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="115"></td>
          <td id="LC115" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const buf = bufferServer(addr);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L116" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="116"></td>
          <td id="LC116" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const body = "hello world";</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L117" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="117"></td>
          <td id="LC117" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const response = await fetch(`http://${addr}/blah`, {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L118" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="118"></td>
          <td id="LC118" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    method: "POST",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L119" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="119"></td>
          <td id="LC119" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    headers: [["Hello", "World"], ["Foo", "Bar"]],</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L120" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="120"></td>
          <td id="LC120" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    body</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L121" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="121"></td>
          <td id="LC121" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  });</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L122" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="122"></td>
          <td id="LC122" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(response.status, 404);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L123" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="123"></td>
          <td id="LC123" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(response.headers.get("Content-Length"), "2");</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L124" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="124"></td>
          <td id="LC124" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L125" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="125"></td>
          <td id="LC125" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const actual = new TextDecoder().decode(buf.bytes());</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L126" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="126"></td>
          <td id="LC126" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const expected = [</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L127" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="127"></td>
          <td id="LC127" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "POST /blah HTTP/1.1\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L128" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="128"></td>
          <td id="LC128" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "hello: World\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L129" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="129"></td>
          <td id="LC129" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "foo: Bar\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L130" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="130"></td>
          <td id="LC130" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    `host: ${addr}\r\n`,</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L131" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="131"></td>
          <td id="LC131" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    `content-length: ${body.length}\r\n\r\n`,</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L132" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="132"></td>
          <td id="LC132" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    body</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L133" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="133"></td>
          <td id="LC133" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  ].join("");</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L134" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="134"></td>
          <td id="LC134" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(actual, expected);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L135" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="135"></td>
          <td id="LC135" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">});</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L136" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="136"></td>
          <td id="LC136" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L137" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="137"></td>
          <td id="LC137" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">testPerm({ net: true }, async function fetchPostBodyTypedArray() {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L138" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="138"></td>
          <td id="LC138" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const addr = "127.0.0.1:4503";</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L139" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="139"></td>
          <td id="LC139" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const buf = bufferServer(addr);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L140" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="140"></td>
          <td id="LC140" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const bodyStr = "hello world";</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L141" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="141"></td>
          <td id="LC141" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const body = new TextEncoder().encode(bodyStr);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L142" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="142"></td>
          <td id="LC142" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const response = await fetch(`http://${addr}/blah`, {</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L143" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="143"></td>
          <td id="LC143" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    method: "POST",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L144" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="144"></td>
          <td id="LC144" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    headers: [["Hello", "World"], ["Foo", "Bar"]],</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L145" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="145"></td>
          <td id="LC145" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    body</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L146" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="146"></td>
          <td id="LC146" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  });</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L147" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="147"></td>
          <td id="LC147" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(response.status, 404);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L148" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="148"></td>
          <td id="LC148" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(response.headers.get("Content-Length"), "2");</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L149" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="149"></td>
          <td id="LC149" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L150" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="150"></td>
          <td id="LC150" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const actual = new TextDecoder().decode(buf.bytes());</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L151" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="151"></td>
          <td id="LC151" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  const expected = [</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L152" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="152"></td>
          <td id="LC152" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "POST /blah HTTP/1.1\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L153" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="153"></td>
          <td id="LC153" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "hello: World\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L154" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="154"></td>
          <td id="LC154" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    "foo: Bar\r\n",</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L155" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="155"></td>
          <td id="LC155" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    `host: ${addr}\r\n`,</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L156" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="156"></td>
          <td id="LC156" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    `content-length: ${body.byteLength}\r\n\r\n`,</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L157" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="157"></td>
          <td id="LC157" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">    bodyStr</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L158" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="158"></td>
          <td id="LC158" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  ].join("");</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L159" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="159"></td>
          <td id="LC159" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">  assertEqual(actual, expected);</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L160" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="160"></td>
          <td id="LC160" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">});</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L161" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="161"></td>
          <td id="LC161" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">*/</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Only happening occasionally - only observed on windows.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test fetchPostBodyTypedArray_permW0N1E0R0
HttpUser: connection closed
    at maybeError (deno/js/errors.ts:38:12)
    at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17)
test result: FAILED. 7 passed; 1 failed; 0 ignored; 0 measured; 206 filtered out
Error: There were 1 test failures.
    at setTimeout (file:///C:/deno/js/testing/testing.ts:110:13)
    at fire (deno/js/timers.ts:131:3)"><pre class="notranslate"><code class="notranslate">test fetchPostBodyTypedArray_permW0N1E0R0
HttpUser: connection closed
    at maybeError (deno/js/errors.ts:38:12)
    at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17)
test result: FAILED. 7 passed; 1 failed; 0 ignored; 0 measured; 206 filtered out
Error: There were 1 test failures.
    at setTimeout (file:///C:/deno/js/testing/testing.ts:110:13)
    at fire (deno/js/timers.ts:131:3)
</code></pre></div>
<p dir="auto">ex: <a href="https://ci.appveyor.com/project/deno/deno/builds/20541747" rel="nofollow">https://ci.appveyor.com/project/deno/deno/builds/20541747</a></p>