Skip to content

Commit fcfe793

Browse files
lidelaschmahmann
authored andcommitted
test: gateway response for bafkqaaa
Context: ipfs#8230
1 parent ffe7578 commit fcfe793

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/sharness/t0110-gateway.sh

+7
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ test_expect_success "GET IPFS nonexistent file returns code expected (404)" '
8484
test_curl_resp_http_code "http://127.0.0.1:$port/ipfs/$HASH2/pleaseDontAddMe" "HTTP/1.1 404 Not Found"
8585
'
8686

87+
# https://github.com/ipfs/go-ipfs/issues/8230
88+
test_expect_success "GET IPFS inlined zero-length data object returns ok code (200)" '
89+
curl -sD - "http://127.0.0.1:$port/ipfs/bafkqaaa" > empty_ok_response &&
90+
test_should_contain "HTTP/1.1 200 OK" empty_ok_response &&
91+
test_should_contain "Content-Length: 0" empty_ok_response
92+
'
93+
8794
test_expect_success "GET /ipfs/ipfs/{cid} returns redirect to the valid path" '
8895
curl -sD - "http://127.0.0.1:$port/ipfs/ipfs/bafkqaaa?query=to-remember" > response_with_double_ipfs_ns &&
8996
test_should_contain "<meta http-equiv=\"refresh\" content=\"10;url=/ipfs/bafkqaaa?query=to-remember\" />" response_with_double_ipfs_ns &&

0 commit comments

Comments
 (0)