-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix unixfs directory redirects #156
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 35 35
Branches 5 5
=========================================
Hits 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self review
|
||
const headers = request.headers | ||
headers.forEach((value, key) => { | ||
log.trace('fetchHandler: request headers: %s: %s', key, value) | ||
}) | ||
|
||
const response = await verifiedFetch(verifiedFetchUrl, { | ||
const response = await verifiedFetch(event.request.url, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we no longer need a lot of the URL manipulating code (which was adding a trailing slash and not allowing verified-fetch unixfs dir redirect to work properly)
import drain from 'it-drain' | ||
import type { Controller } from 'ipfsd-ctl' | ||
|
||
export async function loadFixtureDataCar (controller: Controller, path: string): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as https://github.com/ipfs/helia-verified-fetch/blob/main/packages/interop/src/fixtures/load-fixture-data.ts except for fixture data path
import { path as kuboPath } from 'kubo' | ||
import * as kuboRpcClient from 'kubo-rpc-client' | ||
|
||
export async function createKuboNode (): Promise<Controller> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title
fix: fix unixfs directory redirects
Description
Started as e2e test addition for "Opening a directory with index.html returns index.html" mentioned at #134, ended up fixing #62 and adding a test for it.
Summary of changes:
Notes & open questions
N/A
Change checklist