#ifndef _B_HTTP_PRIVATE_H_
#define _B_HTTP_PRIVATE_H_
#include <string_view>
#include <HttpRequest.h>
#include <Url.h>
namespace BPrivate {
namespace Network {
static inline bool
validate_http_token_string(const std::string_view& string)
{
for (auto it = string.cbegin(); it < string.cend(); it++) {
if (*it <= 31 || *it == 127 || *it == '(' || *it == ')' || *it == '<' || *it == '>'
|| *it == '@' || *it == ',' || *it == ';' || *it == '\\' || *it == '"' || *it == '/'
|| *it == '[' || *it == ']' || *it == '?' || *it == '=' || *it == '{' || *it == '}'
|| *it == ' ')
return false;
}
return true;
}
}
}
#endif