38 lines
670 B
C++
38 lines
670 B
C++
#ifndef headerfile_libscorpiohttpserver_src_headers_parser_h
|
|
#define headerfile_libscorpiohttpserver_src_headers_parser_h
|
|
|
|
#include "client.h"
|
|
|
|
|
|
|
|
|
|
class HeadersParser
|
|
{
|
|
public:
|
|
|
|
void ParseHeaders(Client & client);
|
|
bool IsHeadersEnding(const char * ptr);
|
|
|
|
private:
|
|
|
|
size_t header_index;
|
|
std::wstring tmp_header, tmp_value;
|
|
std::string url_ascii;
|
|
|
|
bool ParseFirstHeader(Client & client);
|
|
bool ParseFirstHeaderMethodName(Client & client);
|
|
bool ParseFirstHeaderURL(Client & client);
|
|
bool ParseFirstHeaderHTTPVersion(Client & client);
|
|
bool ParseHeaderKey(Client & client);
|
|
void ParseHeaderValue(Client & client);
|
|
|
|
void SkipWhite(Client & client);
|
|
|
|
|
|
};
|
|
|
|
|
|
#endif
|
|
|
|
|