Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <UrlParser.h>
Static Public Member Functions | |
static UInt16 | GetDefaultPort (const AString &a_Scheme) |
Returns the default port used by the specified scheme / protocol. More... | |
static bool | IsKnownScheme (const AString &a_Scheme) |
Returns true if the specified scheme (http, ftp, mailto, ...) is recognized by the URL parser. More... | |
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) |
Parses the given URL into individual components. More... | |
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 Authority part of an URL into individual components. More... | |
static std::pair< bool, AString > | Validate (const AString &a_Url) |
Checks if the supplied URL is valid. More... | |
Definition at line 16 of file UrlParser.h.
Returns the default port used by the specified scheme / protocol.
If the scheme is not known, 0 is returned.
Definition at line 14 of file UrlParser.cpp.
|
inlinestatic |
Returns true if the specified scheme (http, ftp, mailto, ...) is recognized by the URL parser.
Is case sensitive, known schemes are always lowercase.
Definition at line 21 of file UrlParser.h.
|
static |
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.
Definition at line 117 of file UrlParser.cpp.
|
static |
Parses the given Authority part of an URL into individual components.
Returns true on success, returns false and error message on failure.
Definition at line 39 of file UrlParser.cpp.
Checks if the supplied URL is valid.
Definition at line 202 of file UrlParser.cpp.