Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for wantsClose (0.18 sec)

  1. src/net/http/server.go

    		// We populate these ahead of time so we're not
    		// reading from req.Header after their Handler starts
    		// and maybe mutates it (Issue 14940)
    		wants10KeepAlive: req.wantsHttp10KeepAlive(),
    		wantsClose:       req.wantsClose(),
    	}
    	if isH2Upgrade {
    		w.closeAfterReply = true
    	}
    	w.cw.res = w
    	w.w = newBufioWriterSize(&w.cw, bufferBeforeChunkingSize)
    	return w, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  2. src/net/http/request.go

    func (r *Request) wantsHttp10KeepAlive() bool {
    	if r.ProtoMajor != 1 || r.ProtoMinor != 0 {
    		return false
    	}
    	return hasToken(r.Header.get("Connection"), "keep-alive")
    }
    
    func (r *Request) wantsClose() bool {
    	if r.Close {
    		return true
    	}
    	return hasToken(r.Header.get("Connection"), "close")
    }
    
    func (r *Request) closeBody() error {
    	if r.Body == nil {
    		return nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  3. src/net/http/transport.go

    	}
    
    	var continueCh chan struct{}
    	if req.ProtoAtLeast(1, 1) && req.Body != nil && req.expectsContinue() {
    		continueCh = make(chan struct{}, 1)
    	}
    
    	if pc.t.DisableKeepAlives &&
    		!req.wantsClose() &&
    		!isProtocolSwitchHeader(req.Header) {
    		req.extraHeaders().Set("Connection", "close")
    	}
    
    	gone := make(chan struct{})
    	defer close(gone)
    
    	const debugRoundTrip = false
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 91K bytes
    - Viewed (0)
Back to top