Lines Matching refs:Connection
42 // the underlying connection has been hijacked using the
44 // connection will return ErrHijacked without any other side
46 ErrHijacked = errors.New("http: connection has been hijacked")
78 // and hangs up the connection. To abort a handler so the client sees
113 // Write writes the data to the connection as part of an HTTP reply.
159 // an HTTP handler to take over the connection.
166 // Hijack lets the caller take over the connection.
168 // will not do anything else with the connection.
171 // and close the connection.
184 // allow detecting when the underlying connection has gone away.
190 // single value (true) when the client connection has gone
219 // the local address the connection arrived on.
224 // A conn represents the server side of an HTTP connection.
226 // server is the server on which the connection arrived.
230 // cancelCtx cancels the connection-level context.
233 // rwc is the underlying network connection.
245 // tlsState is the TLS connection state when using TLS.
265 // on this connection, if any.
275 // hijackedv is whether this connection has been hijacked
402 wants10KeepAlive bool // HTTP/1.0 w/ Connection "keep-alive"
403 wantsClose bool // HTTP request has Connection "close"
419 // close connection after this reply. set on request and
421 // "Connection: keep-alive" response header and a
430 // subsequent requests on this connection and stop reading
514 w.Header().Set("Connection", "close")
596 // Create new connection from rwc.
904 // Read next request from connection.
1038 // in order to keep a connection alive. If there are more bytes than
1039 // this then the server to be paranoid instead sends a "Connection:
1049 w.conn.server.logf("http: response.WriteHeader on hijacked connection")
1079 connection string
1088 []byte("Connection"),
1113 for i, v := range []string{h.contentType, h.connection, h.transferEncoding} {
1209 if sentLength && header.get("Connection") == "keep-alive" {
1218 _, connectionHeaderSet := header["Connection"]
1220 setHeader.connection = "keep-alive"
1226 if header.get("Connection") == "close" || !keepAlivesEnabled {
1232 // request body), don't reuse this connection because it's now
1303 delHeader("Connection")
1304 setHeader.connection = "close"
1342 // content-length has been provided. The connection must be closed after the
1351 // to avoid closing the connection at EOF.
1362 // signal EOF by closing connection.
1375 if w.closeAfterReply && (!keepAlivesEnabled || !hasToken(cw.header.get("Connection"), "close")) {
1376 delHeader("Connection")
1378 setHeader.connection = "close"
1506 w.conn.server.logf("http: response.Write on hijacked connection")
1554 // shouldReuseConnection reports whether the underlying TCP connection can be reused.
1560 // connection.
1569 // There was some error writing to the underlying connection
1598 // reader for a future connection.
1606 // writer for a future connection.
1612 // Close the connection.
1619 // write side of a TCP connection before closing the entire socket.
1622 // from closing a connection with known unread data.
1714 // Serve a new connection.
1799 // Wrap the Body reader with one that replies on the connection
1842 // to the user without "Connection: close" and
1871 w.Header().Set("Connection", "close")
1891 // used after a connection has been hijacked.
2232 w.Header().Set("Connection", "close")
2327 // request headers. The connection's read deadline is reset
2352 // ownership of the provided TLS connection when an NPN/ALPN
2356 // and RemoteAddr if not already set. The connection is
2363 // called when a client connection changes state. See the
2502 // A ConnState represents the state of a client connection to a server.
2507 // StateNew represents a new connection that is expected to
2513 // StateActive represents a connection that has read 1 or more
2523 // the overall state of the connection.
2526 // StateIdle represents a connection that has finished
2532 // StateHijacked represents a hijacked connection.
2536 // StateClosed represents a closed connection.
3062 // (or an attack) and we abort and close the connection,