diff options
| author | yum <yum.food.vr@gmail.com> | 2023-09-13 21:43:33 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-09-13 21:55:05 -0700 |
| commit | 703e183e430f15aff6005d38aefcacf91e2314cd (patch) | |
| tree | 93f647cf7e4be14e36fa9d9b79ea9717fe93e417 /BrowserSource/Proxy/HTTPParser.h | |
| parent | 8fcc6c248554a0b08ecd4b43cc0971b78810c080 (diff) | |
General cleanupv0.15.3
Remove unused proxy code, curl, and images.
Diffstat (limited to 'BrowserSource/Proxy/HTTPParser.h')
| -rw-r--r-- | BrowserSource/Proxy/HTTPParser.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/BrowserSource/Proxy/HTTPParser.h b/BrowserSource/Proxy/HTTPParser.h deleted file mode 100644 index e97f896..0000000 --- a/BrowserSource/Proxy/HTTPParser.h +++ /dev/null @@ -1,52 +0,0 @@ -#pragma once - -#include <string> -#include <string_view> -#include <map> - -namespace WebServer { - - // A simple HTTP/1.1 message parser based on RFC 2616. - class HTTPParser - { - public: - HTTPParser(); - - bool Parse(const std::string& raw_http, std::string& err); - - const std::string& GetMethod() const; - const std::string& GetPath() const; - bool GetHeader(const std::string& header, std::string& value) const; - const std::map<std::string, std::string>& GetHeaders() const; - const std::string& GetPayload() const; - - private: - enum ParserState { - PARSER_STATE_START_LINE, - PARSER_STATE_HEADERS, - PARSER_STATE_PAYLOAD, - }; - - bool ParseSegment( - const std::string_view segment, - ParserState& state, - std::string& err); - bool ParseStartLine( - const std::string_view segment, - ParserState& state, - std::string& err); - bool ParseHeaders( - const std::string_view segment, - ParserState& state, - std::string& err); - bool ParsePayload( - const std::string_view segment, - ParserState& state, - std::string& err); - - std::string method_; - std::string path_; - std::map<std::string, std::string> headers_; - std::string payload_; - }; -} |
