curl-fuzzer C++ reference
Loading...
Searching...
No Matches
ipfs_url.h File Reference

IPFS/IPNS gateway URL construction shared by the scenario runner and its transcript-level tests. More...

Go to the source code of this file.

Functions

std::string proto_fuzzer::BuildIpfsGatewayUrl (curl::fuzzer::proto::Scheme scheme, const std::string &host_path)
 Build the IPFS/IPNS gateway URL for the given scheme and pinned host_path.

Detailed Description

IPFS/IPNS gateway URL construction shared by the scenario runner and its transcript-level tests.

Definition in file ipfs_url.h.

Function Documentation

◆ BuildIpfsGatewayUrl()

std::string proto_fuzzer::BuildIpfsGatewayUrl ( curl::fuzzer::proto::Scheme scheme,
const std::string & host_path )

Build the IPFS/IPNS gateway URL for the given scheme and pinned host_path.

The mutable suffix's dot segments are normalized before the /ipfs/<cid> or /ipns/<name> namespace is prepended, matching curl's tool_ipfs.c ordering so a suffix ending in "/../.." cannot erase the namespace.

Parameters
schemeSCHEME_IPFS or SCHEME_IPNS.
host_pathCanonical identifier (CID/name) followed by the mutable path, query, and fragment suffix.
Returns
The HTTP gateway URL curl will request.

Definition at line 99 of file ipfs_url.cc.