MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / make_multipart_ranges_data

Function make_multipart_ranges_data

dependencies/httplib/httplib.h:4091–4106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4089}
4090
4091inline bool make_multipart_ranges_data(const Request &req, Response &res,
4092 const std::string &boundary,
4093 const std::string &content_type,
4094 std::string &data) {
4095 return process_multipart_ranges_data(
4096 req, res, boundary, content_type,
4097 [&](const std::string &token) { data += token; },
4098 [&](const char *token) { data += token; },
4099 [&](size_t offset, size_t length) {
4100 if (offset < res.body.size()) {
4101 data += res.body.substr(offset, length);
4102 return true;
4103 }
4104 return false;
4105 });
4106}
4107
4108inline size_t
4109get_multipart_ranges_data_length(const Request &req, Response &res,

Callers 1

apply_rangesMethod · 0.85

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected