(to, from http.Header, excludeHeaders map[string]bool)
| 542 | } |
| 543 | |
| 544 | func copyHeaderExcluding(to, from http.Header, excludeHeaders map[string]bool) { |
| 545 | for k, v := range from { |
| 546 | // The http package converts header names to their canonical version. |
| 547 | // Meaning that the lookup below will be done using the canonical version of the header. |
| 548 | if _, ok := excludeHeaders[k]; !ok { |
| 549 | to[http.CanonicalHeaderKey(k)] = v |
| 550 | } |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | func cloneHeader(h http.Header) http.Header { |
| 555 | hh := make(http.Header) |
no outgoing calls
no test coverage detected
searching dependent graphs…