previewBody returns up to 256 bytes of the body for log lines so we don't spam multi-KiB XML envelopes into structured logs while still keeping the useful prefix (S3 puts the ... first).
(body []byte)
| 651 | |
| 652 | req, err := http.NewRequestWithContext(ctx, r.Method, r.URL.String(), nil) |
| 653 | if err != nil { |
| 654 | return 0, "", err |
| 655 | } |
| 656 | for k, vv := range r.Header { |
| 657 | if hopByHop[strings.ToLower(k)] || isInternalPropagationHeader(k) { |
| 658 | continue |
| 659 | } |
| 660 | for _, v := range vv { |
| 661 | req.Header.Add(k, v) |
| 662 | } |
no outgoing calls
no test coverage detected