(req *http.Request)
| 398 | } |
| 399 | |
| 400 | func isTransferEncodingChunked(req *http.Request) bool { |
| 401 | transferEncodingVal := req.Header.Get("Transfer-Encoding") |
| 402 | // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding suggests that this can be a comma |
| 403 | // separated value as well. |
| 404 | return strings.Contains(strings.ToLower(transferEncodingVal), "chunked") |
| 405 | } |
| 406 | |
| 407 | // A helper struct that guarantees a call to close only affects read side, but not write side. |
| 408 | type nopCloserReadWriter struct { |