Lines Matching refs:Connection
509 // previous slow connection didn't run our handler. (that we
708 // Verify that the connection is closed when the declared Content-Length
808 // TestClientCanClose verifies that clients can also force a connection to close.
815 // TestHandlersCanSetConnectionClose verifies that handlers can force a connection to close,
819 w.Header().Set("Connection", "close")
825 w.Header().Set("Connection", "close")
831 // Nothing. (if not hijacked, the server should close the connection
881 t.Fatalf("connection not reused")
977 // Wait for the server to accept it; grab the connection.
980 // Start another request and grab its connection
991 // Send a response on connection 2.
1041 t.Errorf("expected Connection: close; got %v", res.Close)
1133 // Connect an idle TCP connection to this server before we run
1134 // our real tests. This idle connection used to block forever
1382 "Connection: close\r\n"+
1474 if c := rw.Header().Get("Connection"); c != "" {
1475 t.Errorf(`Connection header = %q; want ""`, c)
1483 // and close the connection.
1512 if res := conn.writeBuf.String(); !strings.Contains(res, "Connection: close") {
1513 t.Errorf("Expected a Connection: close header; got response: %s", res)
1528 return "Connection: close\r\n"
1556 // declares Connection: close (so pointless to read more).
1566 // declares Connection: close,
1596 // Big with Connection: close, but chunked, so search for trailers.
1607 // Big with Connection: close, so don't do any reads on Close.
2206 // connection immediately. But when it re-uses the connection, it typically closes
2453 // closing the connection while the request is still being written), but
2506 // connection, and HTTP doesn't really define if that's
2522 // side of their TCP connection, the server doesn't send a 400 Bad Request.
2579 // closing the TCP connection, causing the client to get a RST.
2792 // on a second request on the same connection.
3246 // not sending Connection: close is just a minor wire
3260 expect []string // expected Connection header(s)
3294 got := resp.Header["Connection"]
3296 t.Errorf("wrong Connection headers for request %q. Got %q expect %q", tt.req, got, tt.expect)
3606 w.Header().Set("Connection", "close")
3676 mustGet(ts.URL+"/", "Connection", "close")
3893 // golang.org/issue/8534 -- the Server shouldn't reuse a connection
4080 if !strings.Contains(buf.String(), "Connection: close\r\n") {
4081 t.Errorf("expected 'Connection: close' in response; got: %s", buf.String())
4323 // if the peer closes their TCP connection. This requires that the server
4952 t.Fatal("request three unexpectedly on same connection")
4999 t.Fatal("expected first two requests on same connection")
5021 t.Fatal("expected third request on new connection")
5086 t.Errorf("got same connection between first and second requests")
5095 // waiting for the connection to maybe close.