| 4376 | } |
| 4377 | |
| 4378 | inline 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 | |
| 4395 | inline size_t |
| 4396 | get_multipart_ranges_data_length(const Request &req, Response &res, |
no test coverage detected