virthttp  0.0
libvirt http interface
Classes | Functions | Variables
urlparser.hpp File Reference
#include <algorithm>
#include <cstring>
#include <string_view>
#include <vector>
#include <ctll.hpp>
#include <ctre.hpp>
#include <flatmap.hpp>

Go to the source code of this file.

Classes

class  TargetParser
 
class  URLParser
 
struct  CSVIterator
 

Functions

static constexpr auto target_match (std::string_view sv) noexcept
 
static constexpr auto url_match (std::string_view sv) noexcept
 

Variables

constexpr auto target_pattern = ctll::fixed_string{R"(^($|/[^#?\s]+)?(.*?)?(#[A-Za-z_\-]+)?$)"}
 
constexpr auto target_queries = ctll::fixed_string{R"([&;]?([^=&;]+)=?([^=&;]*))"}
 
constexpr auto target_path_parts = ctll::fixed_string{R"(/([^/]+))"}
 
constexpr auto url_pattern = ctll::fixed_string{R"(^(?:(http[s]?|ftp)://)?([^/]+?)(?::(\d+))?(?:$|/)([^#?\s]+)?(.*?)?(#[A-Za-z_\-]+)?$)"}
 

Function Documentation

static constexpr auto target_match ( std::string_view  sv)
staticnoexcept
static constexpr auto url_match ( std::string_view  sv)
staticnoexcept

Variable Documentation

constexpr auto target_path_parts = ctll::fixed_string{R"(/([^/]+))"}
constexpr auto target_pattern = ctll::fixed_string{R"(^($|/[^#?\s]+)?(.*?)?(#[A-Za-z_\-]+)?$)"}
constexpr auto target_queries = ctll::fixed_string{R"([&;]?([^=&;]+)=?([^=&;]*))"}
constexpr auto url_pattern = ctll::fixed_string{R"(^(?:(http[s]?|ftp)://)?([^/]+?)(?::(\d+))?(?:$|/)([^#?\s]+)?(.*?)?(#[A-Za-z_\-]+)?$)"}