Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isProtocolSwitchResponse (0.21 sec)

  1. src/net/http/response.go

    // indicate a successful protocol upgrade response.
    func (r *Response) isProtocolSwitch() bool {
    	return isProtocolSwitchResponse(r.StatusCode, r.Header)
    }
    
    // isProtocolSwitchResponse reports whether the response code and
    // response header indicate a successful protocol upgrade response.
    func isProtocolSwitchResponse(code int, h Header) bool {
    	return code == StatusSwitchingProtocols && isProtocolSwitchHeader(h)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/net/http/server.go

    	// See https://golang.org/issue/36381.
    	delConnectionHeader := w.closeAfterReply &&
    		(!keepAlivesEnabled || !hasToken(cw.header.get("Connection"), "close")) &&
    		!isProtocolSwitchResponse(w.status, header)
    	if delConnectionHeader {
    		delHeader("Connection")
    		if w.req.ProtoAtLeast(1, 1) {
    			setHeader.connection = "close"
    		}
    	}
    
    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