mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
859e88f653
Previously just ipfs://<cid> and ipns://<cid> was supported, which is too strict for some usecases. This patch allows paths and query arguments to be used too. Making this work according to normal http semantics: ipfs://<cid>/foo/bar?key=val ipns://<cid>/foo/bar?key=val The gateway url support is changed. It now only supports gateways in the form of: http://<gateway>/foo/bar http://<gateway> Query arguments here are explicitly not allowed and trigger an intended malformed url error. There also was a crash when IPFS_PATH was set with a non trailing forward slash. This has been fixed. Lastly, a load of test cases have been added to verify the above. Reported-by: Steven Allen Fixes #12148 Closes #12152
41 lines
629 B
Plaintext
41 lines
629 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
IPFS
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<setenv>
|
|
#
|
|
# Set a home that doesn't have a ".ipfs" folder. %PWD should be good.
|
|
# This is to prevent the automatic gateway detection from finding a gateway file in your home folder.
|
|
HOME=%PWD
|
|
</setenv>
|
|
<name>
|
|
IPFS with no gateway URL (no environment or home file either)
|
|
</name>
|
|
<command>
|
|
ipfs://bafybeidecnvkrygux6uoukouzps5ofkeevoqland7kopseiod6pzqvjg7u
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify with no gateway url and no auto detection
|
|
<verify>
|
|
<errorcode>
|
|
37
|
|
</errorcode>
|
|
</verify>
|
|
</testcase>
|