Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for wantsHttp10KeepAlive (0.43 sec)

  1. src/net/http/request.go

    				return i
    			}
    			i++
    		}
    	}
    	return -1
    }
    
    func (r *Request) expectsContinue() bool {
    	return hasToken(r.Header.get("Expect"), "100-continue")
    }
    
    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 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  2. src/net/http/server.go

    		closeNotifyCh: make(chan bool, 1),
    
    		// 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)
Back to top