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

Function make_multipart_ranges_data

examples/server/httplib.h:4378–4393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4376}
4377
4378inline bool make_multipart_ranges_data(const Request &req, Response &res,
4379 const std::string &boundary,
4380 const std::string &content_type,
4381 std::string &data) {
4382 return process_multipart_ranges_data(
4383 req, res, boundary, content_type,
4384 [&](const std::string &token) { data += token; },
4385 [&](const std::string &token) { data += token; },
4386 [&](size_t offset, size_t length) {
4387 if (offset < res.body.size()) {
4388 data += res.body.substr(offset, length);
4389 return true;
4390 }
4391 return false;
4392 });
4393}
4394
4395inline size_t
4396get_multipart_ranges_data_length(const Request &req, Response &res,

Callers 1

apply_rangesMethod · 0.85

Calls 3

substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected