| 4089 | } |
| 4090 | |
| 4091 | inline 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 | |
| 4108 | inline size_t |
| 4109 | get_multipart_ranges_data_length(const Request &req, Response &res, |
no test coverage detected