-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps uphelp wantedExtra attention is neededExtra attention is needed
Description
I don't think the conformance testing suite should care about whether a redirect is using an absolute or relative URI, but maybe I am missing something.
Basically, verified-fetch is redirecting to an absolute URI, and the host of the absolute URI matches the host of the requested resource, so we could return a relative reference, but I don't think we should need to.
See https://httpwg.org/specs/rfc9110.html#field.location
�=== RUN TestUnixFSDirectoryListingOnSubdomainGateway/redirect_dir_listing_to_URL_with_trailing_slash/Header_Location
run.go:58:
Name: redirect dir listing to URL with trailing slash
Hint:
Error: Header 'Location' expected '/%!c(MISSING)4%!/(MISSING)%!c(MISSING)4%!/(MISSING)', got 'http://bafybeig6ka5mlwkl4subqhaiatalkcleo4jgnr3hqwvpmsqfca27cijp3i.ipfs.localhost:3441/%!C(MISSING)4%!/(MISSING)%!C(MISSING)4%!/(MISSING)'
Expected Request:
{
"method": "GET",
"path": "/ą/ę",
"headers": {
"Host": "bafybeig6ka5mlwkl4subqhaiatalkcleo4jgnr3hqwvpmsqfca27cijp3i.ipfs.localhost:3441"
}
}
Actual Request:
GET /%C4%85/%C4%99 HTTP/1.1
Host: bafybeig6ka5mlwkl4subqhaiatalkcleo4jgnr3hqwvpmsqfca27cijp3i.ipfs.localhost:3441
User-Agent: ipfs/gateway-conformance/dev
Accept-Encoding: gzip
Expected Response:
{
"statusCode": 301,
"headers": [
{
"key": "Location",
"check": {}
}
]
}
Actual Response:
HTTP/1.1 301 Moved Permanently
Transfer-Encoding: chunked
Cache-Control: public, max-age=29030400, immutable
Connection: keep-alive
Date: Tue, 04 Feb 2025 19:10:08 GMT
Etag: "bafybeig6ka5mlwkl4subqhaiatalkcleo4jgnr3hqwvpmsqfca27cijp3i"
Keep-Alive: timeout=5
Location: http://bafybeig6ka5mlwkl4subqhaiatalkcleo4jgnr3hqwvpmsqfca27cijp3i.ipfs.localhost:3441/%C4%85/%C4%99/
X-Ipfs-Path: /ipfs/bafybeig6ka5mlwkl4subqhaiatalkcleo4jgnr3hqwvpmsqfca27cijp3i/%C4%85/%C4%99
�--- FAIL: TestUnixFSDirectoryListingOnSubdomainGateway/redirect_dir_listing_to_URL_with_trailing_slash/Header_Location (0.00s)
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps uphelp wantedExtra attention is neededExtra attention is needed