(response, requestFragment)
| 4243 | const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; |
| 4244 | supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); |
| 4245 | } catch (e) { |
| 4246 | } |
| 4247 | function responseURL(response) { |
| 4248 | const urlList = response.urlList; |
| 4249 | const length = urlList.length; |
| 4250 | return length === 0 ? null : urlList[length - 1].toString(); |
| 4251 | } |
| 4252 | function responseLocationURL(response, requestFragment) { |
| 4253 | if (!redirectStatusSet.has(response.status)) { |
| 4254 | return null; |
| 4255 | } |
| 4256 | let location = response.headersList.get("location", true); |
| 4257 | if (location !== null && isValidHeaderValue(location)) { |
| 4258 | if (!isValidEncodedURL(location)) { |
| 4259 | location = normalizeBinaryStringToUtf8(location); |
| 4260 | } |
| 4261 | location = new URL(location, responseURL(response)); |
| 4262 | } |
| 4263 | if (location && !location.hash) { |
no test coverage detected