MCPcopy Create free account
hub / github.com/imroc/req / requestRequiresHTTP1

Function requestRequiresHTTP1

http_request.go:119–122  ·  view source on GitHub ↗

requiresHTTP1 reports whether this request requires being sent on an HTTP/1 connection.

(r *http.Request)

Source from the content-addressed store, hash-verified

117// requiresHTTP1 reports whether this request requires being sent on
118// an HTTP/1 connection.
119func requestRequiresHTTP1(r *http.Request) bool {
120 return hasToken(r.Header.Get("Connection"), "upgrade") &&
121 ascii.EqualFold(r.Header.Get("Upgrade"), "websocket")
122}
123
124func isReplayable(r *http.Request) bool {
125 if r.Body == nil || r.Body == NoBody || r.GetBody != nil {

Callers 1

Calls 3

EqualFoldFunction · 0.92
hasTokenFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…