From a1ae1110978442e011a91868afb13c38c0818782 Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Wed, 21 May 2025 21:14:42 -0400 Subject: [PATCH 01/10] fix(gateway): support suffix requests --- gateway/backend_blocks.go | 4 ++-- gateway/backend_car.go | 2 +- gateway/gateway.go | 3 ++- gateway/handler_block.go | 2 +- gateway/handler_codec.go | 2 +- gateway/handler_defaults.go | 8 ++++---- gateway/serve_http_content.go | 17 +++++++++++++---- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/gateway/backend_blocks.go b/gateway/backend_blocks.go index c2fde00fe..468d67e94 100644 --- a/gateway/backend_blocks.go +++ b/gateway/backend_blocks.go @@ -141,7 +141,7 @@ func (bb *BlocksBackend) Get(ctx context.Context, path path.ImmutablePath, range } if rootCodec == uint64(mc.Raw) { - if err := seekToRangeStart(f, ra); err != nil { + if err := seekToRangeStart(f, ra, fileSize); err != nil { return ContentPathMetadata{}, nil, err } } @@ -182,7 +182,7 @@ func (bb *BlocksBackend) Get(ctx context.Context, path path.ImmutablePath, range return ContentPathMetadata{}, nil, err } - if err := seekToRangeStart(file, ra); err != nil { + if err := seekToRangeStart(file, ra, fileSize); err != nil { return ContentPathMetadata{}, nil, err } diff --git a/gateway/backend_car.go b/gateway/backend_car.go index 567b0cfac..7d6227703 100644 --- a/gateway/backend_car.go +++ b/gateway/backend_car.go @@ -363,7 +363,7 @@ func (api *CarBackend) Get(ctx context.Context, path path.ImmutablePath, byteRan if rangeCount > 0 { r := byteRanges[0] carParams.Range = &DagByteRange{ - From: int64(r.From), + From: r.From, } // TODO: move to boxo or to loadRequestIntoSharedBlockstoreAndBlocksGateway after we pass params in a humane way diff --git a/gateway/gateway.go b/gateway/gateway.go index d79689925..6cf78f5af 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -219,10 +219,11 @@ type ContentPathMetadata struct { // - From >= 0 and To = nil: Get the file (From, Length) // - From >= 0 and To >= 0: Get the range (From, To) // - From >= 0 and To <0: Get the range (From, Length - To) +// - From < 0 and To = nil: Get the file (Length - From, Length) // // [HTTP Byte Range]: https://httpwg.org/specs/rfc9110.html#rfc.section.14.1.2 type ByteRange struct { - From uint64 + From int64 To *int64 } diff --git a/gateway/handler_block.go b/gateway/handler_block.go index e6bf2267f..27507272e 100644 --- a/gateway/handler_block.go +++ b/gateway/handler_block.go @@ -44,7 +44,7 @@ func (i *handler) serveRawBlock(ctx context.Context, w http.ResponseWriter, r *h return false } - if !i.seekToStartOfFirstRange(w, r, data) { + if !i.seekToStartOfFirstRange(w, r, data, sz) { return false } diff --git a/gateway/handler_codec.go b/gateway/handler_codec.go index 1c93fc9b8..1dc8908b6 100644 --- a/gateway/handler_codec.go +++ b/gateway/handler_codec.go @@ -244,7 +244,7 @@ func (i *handler) serveCodecRaw(ctx context.Context, w http.ResponseWriter, r *h // ServeContent will take care of // If-None-Match+Etag, Content-Length and setting range request headers after we've already seeked to the start of // the first range - if !i.seekToStartOfFirstRange(w, r, blockData) { + if !i.seekToStartOfFirstRange(w, r, blockData, blockSize) { return false } _, dataSent, _ := serveContent(w, r, modtime, blockSize, blockData) diff --git a/gateway/handler_defaults.go b/gateway/handler_defaults.go index c53daf68f..7052f0df0 100644 --- a/gateway/handler_defaults.go +++ b/gateway/handler_defaults.go @@ -185,7 +185,7 @@ func parseRangeWithoutLength(s string) ([]ByteRange, error) { start, end = textproto.TrimString(start), textproto.TrimString(end) var r ByteRange if start == "" { - r.From = 0 + r.To = nil // If no start is specified, end specifies the // range start relative to the end of the file, // and we are dealing with @@ -198,9 +198,9 @@ func parseRangeWithoutLength(s string) ([]ByteRange, error) { if i < 0 || err != nil { return nil, errors.New("invalid range") } - r.To = &i + r.From = -i } else { - i, err := strconv.ParseUint(start, 10, 64) + i, err := strconv.ParseInt(start, 10, 64) if err != nil { return nil, errors.New("invalid range") } @@ -210,7 +210,7 @@ func parseRangeWithoutLength(s string) ([]ByteRange, error) { r.To = nil } else { i, err := strconv.ParseInt(end, 10, 64) - if err != nil || i < 0 || r.From > uint64(i) { + if err != nil || i < 0 || r.From > i { return nil, errors.New("invalid range") } r.To = &i diff --git a/gateway/serve_http_content.go b/gateway/serve_http_content.go index 38b6a5313..0ed3ad898 100644 --- a/gateway/serve_http_content.go +++ b/gateway/serve_http_content.go @@ -455,7 +455,7 @@ func sumRangesSize(ranges []httpRange) (size int64) { } // seekToStartOfFirstRange seeks to the start of the first Range if the request is an HTTP Range Request -func (i *handler) seekToStartOfFirstRange(w http.ResponseWriter, r *http.Request, data io.Seeker) bool { +func (i *handler) seekToStartOfFirstRange(w http.ResponseWriter, r *http.Request, data io.Seeker, size int64) bool { rangeHeader := r.Header.Get("Range") if rangeHeader != "" { ranges, err := parseRangeWithoutLength(rangeHeader) @@ -465,7 +465,7 @@ func (i *handler) seekToStartOfFirstRange(w http.ResponseWriter, r *http.Request } if len(ranges) > 0 { ra := &ranges[0] - err = seekToRangeStart(data, ra) + err = seekToRangeStart(data, ra, size) if err != nil { i.webError(w, r, fmt.Errorf("could not seek to location in range request: %w", err), http.StatusBadRequest) return false @@ -475,9 +475,18 @@ func (i *handler) seekToStartOfFirstRange(w http.ResponseWriter, r *http.Request return true } -func seekToRangeStart(data io.Seeker, ra *ByteRange) error { +func seekToRangeStart(data io.Seeker, ra *ByteRange, size int64) error { if ra != nil && ra.From != 0 { - if _, err := data.Seek(int64(ra.From), io.SeekStart); err != nil { + start := int64(0) + if ra.From < 0 { + if ra.To != nil { + return fmt.Errorf("invalid range: negative start without a nil end") + } + start = size + ra.From + } else { + start = ra.From + } + if _, err := data.Seek(start, io.SeekStart); err != nil { return err } } From 1147b6caee2221c5fa8c7020d0a9b525ccf18ab8 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 27 May 2025 23:25:16 +0200 Subject: [PATCH 02/10] fix: negative start bigger than the file size --- gateway/serve_http_content.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gateway/serve_http_content.go b/gateway/serve_http_content.go index 0ed3ad898..5f3160def 100644 --- a/gateway/serve_http_content.go +++ b/gateway/serve_http_content.go @@ -482,7 +482,10 @@ func seekToRangeStart(data io.Seeker, ra *ByteRange, size int64) error { if ra.To != nil { return fmt.Errorf("invalid range: negative start without a nil end") } - start = size + ra.From + start = size + ra.From - 1 + if start < 0 { + return fmt.Errorf("invalid range: negative start bigger than the file size") + } } else { start = ra.From } From c30b27a0092c3468f23b204acb5d000860dcd158 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 00:22:41 +0200 Subject: [PATCH 03/10] fix: no empty content-type in range responses --- gateway/serve_http_content.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gateway/serve_http_content.go b/gateway/serve_http_content.go index 5f3160def..02bce4b30 100644 --- a/gateway/serve_http_content.go +++ b/gateway/serve_http_content.go @@ -112,6 +112,11 @@ func httpServeContent(w http.ResponseWriter, r *http.Request, modtime time.Time, w.Header().Set("Content-Length", strconv.FormatInt(sendSize, 10)) } + if contentType := w.Header().Get("Content-Type"); contentType == "" { + // Ensure empty string is not returned as value + delete(w.Header(), "Content-Type") + } + w.WriteHeader(code) if r.Method != http.MethodHead { From 40f6d8daa2f958337a6c3dd333a9b2158ad5006e Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 00:24:08 +0200 Subject: [PATCH 04/10] test: gateway-conformance#213 --- .github/workflows/gateway-conformance.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gateway-conformance.yml b/.github/workflows/gateway-conformance.yml index 60a2cfc18..f17a26ff7 100644 --- a/.github/workflows/gateway-conformance.yml +++ b/.github/workflows/gateway-conformance.yml @@ -22,7 +22,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.7 + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@789cfac0863dcb462a05b9d1b2e19aee37d77df2 with: output: fixtures merged: true @@ -47,7 +47,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@v0.7 + uses: ipfs/gateway-conformance/.github/actions/test@789cfac0863dcb462a05b9d1b2e19aee37d77df2 with: gateway-url: http://127.0.0.1:8040 subdomain-url: http://example.net:8040 @@ -84,7 +84,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.7 + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@789cfac0863dcb462a05b9d1b2e19aee37d77df2 with: output: fixtures merged: true @@ -114,7 +114,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@v0.7 + uses: ipfs/gateway-conformance/.github/actions/test@789cfac0863dcb462a05b9d1b2e19aee37d77df2 with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote block gateway subdomain-url: http://example.net:8040 @@ -152,7 +152,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.7 + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@789cfac0863dcb462a05b9d1b2e19aee37d77df2 with: output: fixtures merged: true @@ -182,7 +182,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@v0.7 + uses: ipfs/gateway-conformance/.github/actions/test@789cfac0863dcb462a05b9d1b2e19aee37d77df2 with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote car gateway subdomain-url: http://example.net:8040 From ccc90f693524810dac8d17b2b78b98ee6d6e526c Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 00:53:54 +0200 Subject: [PATCH 05/10] chore: one off --- gateway/serve_http_content.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/serve_http_content.go b/gateway/serve_http_content.go index 02bce4b30..6b620bd1a 100644 --- a/gateway/serve_http_content.go +++ b/gateway/serve_http_content.go @@ -487,7 +487,7 @@ func seekToRangeStart(data io.Seeker, ra *ByteRange, size int64) error { if ra.To != nil { return fmt.Errorf("invalid range: negative start without a nil end") } - start = size + ra.From - 1 + start = size + ra.From if start < 0 { return fmt.Errorf("invalid range: negative start bigger than the file size") } From ee5383de365bb141ba62d0d8a47b66279ba50cad Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 00:59:49 +0200 Subject: [PATCH 06/10] chore: update conformance --- .github/workflows/gateway-conformance.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gateway-conformance.yml b/.github/workflows/gateway-conformance.yml index f17a26ff7..995e4f6c8 100644 --- a/.github/workflows/gateway-conformance.yml +++ b/.github/workflows/gateway-conformance.yml @@ -22,7 +22,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@789cfac0863dcb462a05b9d1b2e19aee37d77df2 + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d with: output: fixtures merged: true @@ -47,7 +47,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@789cfac0863dcb462a05b9d1b2e19aee37d77df2 + uses: ipfs/gateway-conformance/.github/actions/test@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d with: gateway-url: http://127.0.0.1:8040 subdomain-url: http://example.net:8040 @@ -84,7 +84,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@789cfac0863dcb462a05b9d1b2e19aee37d77df2 + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d with: output: fixtures merged: true @@ -114,7 +114,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@789cfac0863dcb462a05b9d1b2e19aee37d77df2 + uses: ipfs/gateway-conformance/.github/actions/test@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote block gateway subdomain-url: http://example.net:8040 @@ -152,7 +152,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@789cfac0863dcb462a05b9d1b2e19aee37d77df2 + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d with: output: fixtures merged: true @@ -182,7 +182,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@789cfac0863dcb462a05b9d1b2e19aee37d77df2 + uses: ipfs/gateway-conformance/.github/actions/test@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote car gateway subdomain-url: http://example.net:8040 From 6274fc576a66dd6a61b8306cd6ae595551bfece8 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 02:23:37 +0200 Subject: [PATCH 07/10] fix: backend_car.go car backend did not support negative ranges, this attempts to fix that for raw blocks and dag-pb files --- .github/workflows/gateway-conformance.yml | 12 +++++------ gateway/backend_car.go | 25 +++++++++++++++++++++-- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gateway-conformance.yml b/.github/workflows/gateway-conformance.yml index 995e4f6c8..22249b4cb 100644 --- a/.github/workflows/gateway-conformance.yml +++ b/.github/workflows/gateway-conformance.yml @@ -22,7 +22,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c with: output: fixtures merged: true @@ -47,7 +47,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d + uses: ipfs/gateway-conformance/.github/actions/test@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c with: gateway-url: http://127.0.0.1:8040 subdomain-url: http://example.net:8040 @@ -84,7 +84,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c with: output: fixtures merged: true @@ -114,7 +114,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d + uses: ipfs/gateway-conformance/.github/actions/test@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote block gateway subdomain-url: http://example.net:8040 @@ -152,7 +152,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c with: output: fixtures merged: true @@ -182,7 +182,7 @@ jobs: # 4. Run the gateway-conformance tests - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@0ac0eb5e0f0ca0b02043cd4b1656e6b562db611d + uses: ipfs/gateway-conformance/.github/actions/test@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote car gateway subdomain-url: http://example.net:8040 diff --git a/gateway/backend_car.go b/gateway/backend_car.go index 7d6227703..b7bac515b 100644 --- a/gateway/backend_car.go +++ b/gateway/backend_car.go @@ -442,13 +442,25 @@ func loadTerminalEntity(ctx context.Context, c cid.Cid, blk blocks.Block, lsys * } f := files.NewBytesFile(blockData) + size := int64(len(blockData)) + from := int64(0) if params.Range != nil && params.Range.From != 0 { - if _, err := f.Seek(params.Range.From, io.SeekStart); err != nil { + from = params.Range.From + if from < 0 { // negative range from the end of file + if params.Range.To != nil { + return nil, fmt.Errorf("invalid car backend range: negative start without a nil end") + } + from = size + from + if from < 0 { + return nil, fmt.Errorf("invalid car backend range: negative start bigger than the file size") + } + } + if _, err := f.Seek(from, io.SeekStart); err != nil { return nil, err } } - return NewGetResponseFromReader(f, int64(len(blockData))), nil + return NewGetResponseFromReader(f, size), nil } blockData, pbn, ufsFieldData, fieldNum, err := loadUnixFSBase(ctx, c, blk, lsys) @@ -554,6 +566,15 @@ func loadTerminalEntity(ctx context.Context, c cid.Cid, blk blocks.Block, lsys * if params.Range != nil { from = params.Range.From byteRange = *params.Range + if from < 0 { // negative range from the end of file + if params.Range.To != nil { + return nil, fmt.Errorf("invalid car backend range: negative start without a nil end") + } + from = fileSize + from + if from < 0 { + return nil, fmt.Errorf("invalid car backend range: negative start bigger than the file size") + } + } } _, err = f.Seek(from, io.SeekStart) if err != nil { From 7f26a32513c32f383d57c6607135959c5f9bebae Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 03:03:14 +0200 Subject: [PATCH 08/10] chore: remove todo --- gateway/handler_defaults.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/handler_defaults.go b/gateway/handler_defaults.go index 7052f0df0..ca06bd26f 100644 --- a/gateway/handler_defaults.go +++ b/gateway/handler_defaults.go @@ -52,7 +52,7 @@ func (i *handler) serveDefaults(ctx context.Context, w http.ResponseWriter, r *h case http.MethodGet: rangeHeader := r.Header.Get("Range") if rangeHeader != "" { - // TODO: Add tests for range parsing + // Note: proper tests for Range parsing live in https://github.com/ipfs/gateway-conformance ranges, err = parseRangeWithoutLength(rangeHeader) if err != nil { i.webError(w, r, fmt.Errorf("invalid range request: %w", err), http.StatusBadRequest) From 4652c510917b4c84be53f8dff3cb4d8133fd5c85 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 18:12:57 +0200 Subject: [PATCH 09/10] test: gateway-conformance v0.8 https://github.com/ipfs/gateway-conformance/releases/tag/v0.8.0 --- .github/workflows/gateway-conformance.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gateway-conformance.yml b/.github/workflows/gateway-conformance.yml index 22249b4cb..47bb861e7 100644 --- a/.github/workflows/gateway-conformance.yml +++ b/.github/workflows/gateway-conformance.yml @@ -22,7 +22,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.8 with: output: fixtures merged: true @@ -46,8 +46,8 @@ jobs: run: boxo/examples/gateway/car-file/test-gateway -c fixtures/fixtures.car -p 8040 & # 4. Run the gateway-conformance tests - - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c + - name: Run gateway-conformance tests without IPNS and DNSLink + uses: ipfs/gateway-conformance/.github/actions/test@v0.8 with: gateway-url: http://127.0.0.1:8040 subdomain-url: http://example.net:8040 @@ -84,7 +84,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.8 with: output: fixtures merged: true @@ -113,8 +113,8 @@ jobs: run: boxo/examples/gateway/proxy-blocks/test-gateway -g http://127.0.0.1:8030 -p 8040 & # 4. Run the gateway-conformance tests - - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c + - name: Run gateway-conformance tests without IPNS and DNSLink + uses: ipfs/gateway-conformance/.github/actions/test@v0.8 with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote block gateway subdomain-url: http://example.net:8040 @@ -152,7 +152,7 @@ jobs: steps: # 1. Download the gateway-conformance fixtures - name: Download gateway-conformance fixtures - uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c + uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.8 with: output: fixtures merged: true @@ -181,8 +181,8 @@ jobs: run: boxo/examples/gateway/proxy-car/test-gateway -g http://127.0.0.1:8030 -p 8040 & # 4. Run the gateway-conformance tests - - name: Run gateway-conformance tests - uses: ipfs/gateway-conformance/.github/actions/test@ad744bcd756caa1cdbb4eb2be04367b4ae2ebf0c + - name: Run gateway-conformance tests without IPNS and DNSLink + uses: ipfs/gateway-conformance/.github/actions/test@v0.8 with: gateway-url: http://127.0.0.1:8040 # we test gateway that is backed by a remote car gateway subdomain-url: http://example.net:8040 From a7c67ae7f1d613340bf242dea2931bc0ccb062fe Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 28 May 2025 18:55:48 +0200 Subject: [PATCH 10/10] docs: changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9299d9f99..7853870d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ The following emojis are used to highlight certain changes: ### Fixed +- `gateway`: Fixed suffix range-requests and updated tests to [gateway-conformance v0.8](https://github.com/ipfs/gateway-conformance/releases/tag/v0.8.0) [#922](https://github.com/ipfs/boxo/pull/922) + ### Security