| 258 | } |
| 259 | |
| 260 | bool HTMLForm::MultipartReadBuffer::skipToNextBoundary() |
| 261 | { |
| 262 | if (in.eof()) |
| 263 | return false; |
| 264 | |
| 265 | chassert(boundary_hit); |
| 266 | chassert(!found_last_boundary); |
| 267 | |
| 268 | boundary_hit = false; |
| 269 | |
| 270 | while (!in.eof()) |
| 271 | { |
| 272 | auto line = readLine(true); |
| 273 | if (startsWith(line, boundary)) |
| 274 | { |
| 275 | set(in.position(), 0); |
| 276 | next(); /// We need to restrict our buffer to size of next available line. |
| 277 | found_last_boundary = startsWith(line, boundary + "--"); |
| 278 | return !found_last_boundary; |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | return false; |
| 283 | } |
| 284 | |
| 285 | std::string HTMLForm::MultipartReadBuffer::readLine(bool append_crlf) |
| 286 | { |
no test coverage detected