Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for outgoingLength (0.12 sec)

  1. 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)
  2. 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)
Back to top