(...args)
| 2203 | arr.push(str); |
| 2204 | } |
| 2205 | } |
| 2206 | val = arr; |
| 2207 | } else if (typeof val === "string") { |
| 2208 | if (!isValidHeaderValue(val)) { |
| 2209 | throw new InvalidArgumentError(`invalid ${key} header`); |
| 2210 | } |
| 2211 | } else if (val === null) { |
| 2212 | val = ""; |
| 2213 | } else { |
| 2214 | val = `${val}`; |
| 2215 | if (!isValidHeaderValue(val)) { |
| 2216 | throw new InvalidArgumentError(`invalid ${key} header`); |
| 2217 | } |
| 2218 | } |
| 2219 | if (headerName === "host") { |
| 2220 | if (request.host !== null) { |
| 2221 | throw new InvalidArgumentError("duplicate host header"); |
| 2222 | } |
| 2223 | if (typeof val !== "string") { |
| 2224 | throw new InvalidArgumentError("invalid host header"); |
nothing calls this directly
no outgoing calls
no test coverage detected