| 299 | // ---------------------------------------------------------------------------------------- |
| 300 | |
| 301 | void read_body ( |
| 302 | std::istream& in, |
| 303 | incoming_things& incoming |
| 304 | ) |
| 305 | { |
| 306 | // if the body hasn't already been loaded and there is data to load |
| 307 | if (incoming.body.size() == 0 && |
| 308 | incoming.headers.count("Content-Length") != 0) |
| 309 | { |
| 310 | const unsigned long content_length = string_cast<unsigned long>(incoming.headers["Content-Length"]); |
| 311 | |
| 312 | incoming.body.resize(content_length); |
| 313 | if (content_length > 0) |
| 314 | { |
| 315 | in.read(&incoming.body[0],content_length); |
| 316 | } |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | // ---------------------------------------------------------------------------------------- |
| 321 |
no test coverage detected