| 4106 | } |
| 4107 | |
| 4108 | inline size_t |
| 4109 | get_multipart_ranges_data_length(const Request &req, Response &res, |
| 4110 | const std::string &boundary, |
| 4111 | const std::string &content_type) { |
| 4112 | size_t data_length = 0; |
| 4113 | |
| 4114 | process_multipart_ranges_data( |
| 4115 | req, res, boundary, content_type, |
| 4116 | [&](const std::string &token) { data_length += token.size(); }, |
| 4117 | [&](const char *token) { data_length += strlen(token); }, |
| 4118 | [&](size_t /*offset*/, size_t length) { |
| 4119 | data_length += length; |
| 4120 | return true; |
| 4121 | }); |
| 4122 | |
| 4123 | return data_length; |
| 4124 | } |
| 4125 | |
| 4126 | template <typename T> |
| 4127 | inline bool write_multipart_ranges_data(Stream &strm, const Request &req, |
no test coverage detected