(headersStr, key)
| 1950 | if (aj !== bj) throw new Error(msg ? `${msg}: expected ${bj}, got ${aj}` : `deep equal failed`); |
| 1951 | } |
| 1952 | function getHeader(headersStr, key) { |
| 1953 | const lines = (headersStr || "").split(/\r?\n/); |
| 1954 | const line = lines.find((l) => l.toLowerCase().startsWith(key.toLowerCase() + ":")); |
| 1955 | return line ? line.split(":").slice(1).join(":").trim() : ""; |
| 1956 | } |
| 1957 | function objectProps(o) { |
| 1958 | if (!o || typeof o !== "object") return "not an object"; |
| 1959 | let z, oD, zD; |