Skip to content
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

bug: string expected to convert to in dag-json tests #200

Open
SgtPooki opened this issue Mar 30, 2024 · 0 comments
Open

bug: string expected to convert to in dag-json tests #200

SgtPooki opened this issue Mar 30, 2024 · 0 comments

Comments

@SgtPooki
Copy link
Member

SgtPooki commented Mar 30, 2024

cc @lidel

This CID references some text: I am a txt file on path with utf8

Why are we trying to confirm that the content-type is dag-json? shouldn't this be failing...

more details in ipfs/helia-verified-fetch#35

Gateway conformance output:

[gateway-conformance] �=== RUN   TestDagPbConversion/GET_UnixFS_file_as_DAG-JSON_with_format=dag-json_converts_to_the_expected_Content-Type/Status_code
[gateway-conformance] �--- PASS: TestDagPbConversion/GET_UnixFS_file_as_DAG-JSON_with_format=dag-json_converts_to_the_expected_Content-Type/Status_code (0.00s)
[gateway-conformance] �=== NAME  TestDagPbConversion/GET_UnixFS_file_as_DAG-JSON_with_format=dag-json_converts_to_the_expected_Content-Type
[gateway-conformance] �=== RUN   TestDagPbConversion/GET_UnixFS_file_as_DAG-JSON_with_format=dag-json_converts_to_the_expected_Content-Type/Header_Content-Type
[gateway-conformance] 
[gateway-conformance]     run.go:53: 
[gateway-conformance]         Name: GET UnixFS file as DAG-JSON with format=dag-json converts to the expected Content-Type
[gateway-conformance]         Hint: 
[gateway-conformance]         
[gateway-conformance]         Error: Header 'Content-Type' expected 'application/vnd.ipld.dag-json', got 'text/plain; charset=utf-8'
[gateway-conformance]         
[gateway-conformance]         Expected Request:
[gateway-conformance]         {
[gateway-conformance]           "method": "GET",
[gateway-conformance]           "path": "/ipfs/bafkreialihlqnf5uwo4byh4n3cmwlntwqzxxs2fg5vanqdi3d7tb2l5xkm",
[gateway-conformance]           "query": {
[gateway-conformance]             "format": [
[gateway-conformance]               "dag-json"
[gateway-conformance]             ]
[gateway-conformance]           }
[gateway-conformance]         }
[gateway-conformance]         
[gateway-conformance]         Actual Request:
[gateway-conformance]         GET /ipfs/bafkreialihlqnf5uwo4byh4n3cmwlntwqzxxs2fg5vanqdi3d7tb2l5xkm?format=dag-json HTTP/1.1
[gateway-conformance]         Host: host.docker.internal:8080
[gateway-conformance]         User-Agent: Go-http-client/1.1
[gateway-conformance]         Accept-Encoding: gzip
[gateway-conformance]         
[gateway-conformance]         
[gateway-conformance]         
[gateway-conformance]         Expected Response:
[gateway-conformance]         {
[gateway-conformance]           "statusCode": 200,
[gateway-conformance]           "headers": [
[gateway-conformance]             {
[gateway-conformance]               "key": "Content-Type",
[gateway-conformance]               "check": {}
[gateway-conformance]             },
[gateway-conformance]             {
[gateway-conformance]               "key": "Content-Disposition",
[gateway-conformance]               "check": {}
[gateway-conformance]             },
[gateway-conformance]             {
[gateway-conformance]               "key": "Content-Type",
[gateway-conformance]               "check": {},
[gateway-conformance]               "not": true
[gateway-conformance]             }
[gateway-conformance]           ],
[gateway-conformance]           "body": "eyIvIjp7ImJ5dGVzIjoiU1NCaGJTQmhJSFI0ZENCbWFXeGxJRzl1SUhCaGRHZ2dkMmwwYUNCMWRHWTRDZyJ9fQ=="
[gateway-conformance]         }
[gateway-conformance]         
[gateway-conformance]         Actual Response:
[gateway-conformance]         HTTP/1.1 200 OK
[gateway-conformance]         Content-Length: 31
[gateway-conformance]         Access-Control-Allow-Headers: Content-Type, Range, User-Agent, X-Requested-With
[gateway-conformance]         Access-Control-Allow-Methods: GET, HEAD, OPTIONS
[gateway-conformance]         Access-Control-Allow-Origin: *
[gateway-conformance]         Access-Control-Expose-Headers: Content-Range, Content-Length, X-Ipfs-Path, X-Ipfs-Roots, X-Chunked-Output, X-Stream-Output
[gateway-conformance]         Connection: keep-alive
[gateway-conformance]         Content-Type: text/plain; charset=utf-8
[gateway-conformance]         Date: Fri, 29 Mar 2024 23:56:49 GMT
[gateway-conformance]         Keep-Alive: timeout=72
@SgtPooki SgtPooki changed the title bug: bafkreialihlqnf5uwo4byh4n3cmwlntwqzxxs2fg5vanqdi3d7tb2l5xkm in dag-json tests bug: string expected to convert to in dag-json tests Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant