aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/misc/parsed_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'library/cpp/http/misc/parsed_request.h')
-rw-r--r--library/cpp/http/misc/parsed_request.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/library/cpp/http/misc/parsed_request.h b/library/cpp/http/misc/parsed_request.h
new file mode 100644
index 0000000000..d4df705495
--- /dev/null
+++ b/library/cpp/http/misc/parsed_request.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include <util/generic/strbuf.h>
+
+struct TParsedHttpRequest {
+ TParsedHttpRequest(const TStringBuf& str);
+
+ TStringBuf Method;
+ TStringBuf Request;
+ TStringBuf Proto;
+};
+
+struct TParsedHttpLocation {
+ TParsedHttpLocation(const TStringBuf& req);
+
+ TStringBuf Path;
+ TStringBuf Cgi;
+};
+
+struct TParsedHttpFull: public TParsedHttpRequest, public TParsedHttpLocation {
+ inline TParsedHttpFull(const TStringBuf& line)
+ : TParsedHttpRequest(line)
+ , TParsedHttpLocation(Request)
+ {
+ }
+};