requestMethodUsuallyLacksBody reports whether the given request method is one that typically does not involve a request body. This is used by the Transport (via transferWriter.shouldSendChunkedRequestBody) to determine whether we try to test-read a byte from a non-nil Request.Body when Request.outgo
(method string)
| 107 | // Request.outgoingLength() returns -1. See the comments in |
| 108 | // shouldSendChunkedRequestBody. |
| 109 | func requestMethodUsuallyLacksBody(method string) bool { |
| 110 | switch method { |
| 111 | case "GET", "HEAD", "DELETE", "OPTIONS", "PROPFIND", "SEARCH": |
| 112 | return true |
| 113 | } |
| 114 | return false |
| 115 | } |
| 116 | |
| 117 | // requiresHTTP1 reports whether this request requires being sent on |
| 118 | // an HTTP/1 connection. |
no outgoing calls
no test coverage detected
searching dependent graphs…