18 lines
326 B
C++
18 lines
326 B
C++
|
|
#include "parsing_message_http.hpp"
|
|
|
|
std::string
|
|
parse_http_body(std::string message)
|
|
{
|
|
std::string body;
|
|
size_t pos;
|
|
|
|
pos = message.find(CRLF CRLF);
|
|
pos += std::string(CRLF CRLF).size();
|
|
// TODO: copying just like that might fail in case of binary or images
|
|
body = message.substr(pos);
|
|
|
|
return body;
|
|
}
|
|
|