summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/UrlParser.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-01-03 15:59:55 +0100
committerMattes D <github@xoft.cz>2016-03-01 16:19:56 +0100
commitfea556ca1b8aeec975f5276d5d829ee6275841d9 (patch)
tree9a61a61edbb232c01bfb34e1c2959542d470887e /src/HTTPServer/UrlParser.h
parentAdded HTTPResponseParser. (diff)
downloadcuberite-fea556ca1b8aeec975f5276d5d829ee6275841d9.tar
cuberite-fea556ca1b8aeec975f5276d5d829ee6275841d9.tar.gz
cuberite-fea556ca1b8aeec975f5276d5d829ee6275841d9.tar.bz2
cuberite-fea556ca1b8aeec975f5276d5d829ee6275841d9.tar.lz
cuberite-fea556ca1b8aeec975f5276d5d829ee6275841d9.tar.xz
cuberite-fea556ca1b8aeec975f5276d5d829ee6275841d9.tar.zst
cuberite-fea556ca1b8aeec975f5276d5d829ee6275841d9.zip
Diffstat (limited to 'src/HTTPServer/UrlParser.h')
-rw-r--r--src/HTTPServer/UrlParser.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/HTTPServer/UrlParser.h b/src/HTTPServer/UrlParser.h
deleted file mode 100644
index 15a63e05d..000000000
--- a/src/HTTPServer/UrlParser.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-// UrlParser.h
-
-// Declares the cUrlParser class that parses string URL into individual parts
-
-
-
-
-
-#pragma once
-
-
-
-
-
-class cUrlParser
-{
-public:
- /** Returns true if the specified scheme (http, ftp, mailto, ...) is recognized by the URL parser.
- Is case sensitive, known schemes are always lowercase. */
- static bool IsKnownScheme(const AString & a_Scheme) { return (GetDefaultPort(a_Scheme) > 0); }
-
- /** Returns the default port used by the specified scheme / protocol.
- If the scheme is not known, 0 is returned. */
- static UInt16 GetDefaultPort(const AString & a_Scheme);
-
- /** Parses the given Authority part of an URL into individual components.
- Returns true on success,
- returns false and error message on failure. */
- static std::pair<bool, AString> ParseAuthorityPart(
- const AString & a_AuthorityPart,
- AString & a_Username,
- AString & a_Password,
- AString & a_Host,
- UInt16 & a_Port
- );
-
- /** Parses the given URL into individual components.
- Returns true on success,
- returns false and error message on failure.
- Fails if the scheme (protocol) is not known.
- If port is missing, the default port for the specific scheme is applied. */
- static std::pair<bool, AString> Parse(
- const AString & a_Url,
- AString & a_Scheme,
- AString & a_Username,
- AString & a_Password,
- AString & a_Host,
- UInt16 & a_Port,
- AString & a_Path,
- AString & a_Query,
- AString & a_Fragment
- );
-};
-
-
-
-