MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / make_range_header

Function make_range_header

examples/server/httplib.h:4805–4816  ·  view source on GitHub ↗

Header utilities

Source from the content-addressed store, hash-verified

4803
4804// Header utilities
4805inline std::pair<std::string, std::string> make_range_header(Ranges ranges) {
4806 std::string field = "bytes=";
4807 auto i = 0;
4808 for (auto r : ranges) {
4809 if (i != 0) { field += ", "; }
4810 if (r.first != -1) { field += std::to_string(r.first); }
4811 field += '-';
4812 if (r.second != -1) { field += std::to_string(r.second); }
4813 i++;
4814 }
4815 return std::make_pair("Range", std::move(field));
4816}
4817
4818inline std::pair<std::string, std::string>
4819make_basic_authentication_header(const std::string &username,

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.70

Tested by

no test coverage detected