- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for outgoingLength (0.4 sec)
-
src/net/http/httputil/dump.go
type neverEnding byte func (b neverEnding) Read(p []byte) (n int, err error) { for i := range p { p[i] = byte(b) } return len(p), nil } // outgoingLength is a copy of the unexported // (*http.Request).outgoingLength method. func outgoingLength(req *http.Request) int64 { if req.Body == nil || req.Body == http.NoBody { return 0 } if req.ContentLength != 0 { return req.ContentLength } return -1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 9.3K bytes - Viewed (0) -
src/net/http/transfer.go
t.Close = rr.Close t.TransferEncoding = rr.TransferEncoding t.Header = rr.Header t.Trailer = rr.Trailer t.Body = rr.Body t.BodyCloser = rr.Body t.ContentLength = rr.outgoingLength() if t.ContentLength < 0 && len(t.TransferEncoding) == 0 && t.shouldSendChunkedRequestBody() { t.TransferEncoding = []string{"chunked"} } // If there's a body, conservatively flush the headers
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 22:14:00 UTC 2024 - 31.1K bytes - Viewed (0) -
src/net/http/request.go
if r.Header.has("Idempotency-Key") || r.Header.has("X-Idempotency-Key") { return true } } return false } // outgoingLength reports the Content-Length of this outgoing (Client) request. // It maps 0 into -1 (unknown) when the Body is non-nil. func (r *Request) outgoingLength() int64 { if r.Body == nil || r.Body == NoBody { return 0 } if r.ContentLength != 0 { return r.ContentLength }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 49.4K bytes - Viewed (0) -
src/net/http/client.go
if reqMethod != "GET" && reqMethod != "HEAD" { redirectMethod = "GET" } case 307, 308: redirectMethod = reqMethod shouldRedirect = true includeBody = true if ireq.GetBody == nil && ireq.outgoingLength() != 0 { // We had a request body, and 307/308 require // re-sending it, but GetBody is not defined. So just // return this response to the user instead of an // error, like we did in Go 1.7 and earlier.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 06:06:11 UTC 2024 - 33.7K bytes - Viewed (0) -
src/net/http/transport.go
return false } if _, ok := err.(nothingWrittenError); ok { // We never wrote anything, so it's safe to retry, if there's no body or we // can "rewind" the body with GetBody. return req.outgoingLength() == 0 || req.GetBody != nil } if !req.isReplayable() { // Don't retry non-idempotent requests. return false } if _, ok := err.(transportReadFromServerError); ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0)