34 lines
550 B
C++
34 lines
550 B
C++
|
|
#ifndef PARSING_MESSAGE_HTTP_HPP
|
|
# define PARSING_MESSAGE_HTTP_HPP
|
|
|
|
# include <iostream>
|
|
# include <string>
|
|
# include <vector>
|
|
# include <map>
|
|
# include "utils.hpp"
|
|
|
|
std::map<std::string, std::string>
|
|
parse_http_headers(std::string message);
|
|
|
|
std::string
|
|
parse_http_body(std::string message);
|
|
|
|
bool
|
|
maybe_http_first_line(std::string);
|
|
|
|
// http message structure :
|
|
//
|
|
// start-line
|
|
// request-line
|
|
// method SP target SP version
|
|
// response-line
|
|
// version SP status SP reason
|
|
// header-fields
|
|
// name ":" SP value
|
|
// CRLF
|
|
// body
|
|
|
|
#endif
|
|
|