ipfs / ipfs/gateway-conformance

Add Content-Type and Content-Disposition for plain text, json, and PNG

Open
#234 0 comments 0 reactions 0 assignees View on GitHub
P1 test:coverage
Dominant language
Go
Stars
19
Forks
15
Avg merge
1d 4h
Merged PRs (30d)
5

Description

`Content-Type` and `Content-Disposition` header in response have high impact for web browser experience.
They inform browser how to render content and what filename is used in "Save As" user flows.

Ref.
- https://specs.ipfs.tech/http-gateways/path-gateway/#cache-control-response-header
- https://specs.ipfs.tech/http-gateways/path-gateway/#content-disposition-response-header
- https://github.com/ipfs/service-worker-gateway/issues/574 (we want to avoid bugs like that)

### TODO

Some of below may already exist, but we should confirm and fill any gaps:

`Content-Type` test for
- [ ] plain text
- [ ] JSON
- [ ] image (1x1px PNG?)
- [ ] raw block
- [ ] car
- [ ] ipns-record

`Content-Disposition` test for
- [ ] plain text
- [ ] JSON
- [ ] image (1x1px PNG?)
- [ ] raw block
- [ ] car
- [ ] ipns-record

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.