mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
add is_i2p
This commit is contained in:
parent
b14d1801f0
commit
1500e805dd
2 changed files with 13 additions and 3 deletions
|
@ -29,7 +29,7 @@ namespace http {
|
|||
inline bool is_http_method(const std::string & str) {
|
||||
return std::find(HTTP_METHODS.begin(), HTTP_METHODS.end(), str) != std::end(HTTP_METHODS);
|
||||
}
|
||||
|
||||
|
||||
void strsplit(const std::string & line, std::vector<std::string> &tokens, char delim, std::size_t limit = 0) {
|
||||
std::size_t count = 0;
|
||||
std::stringstream ss(line);
|
||||
|
@ -195,6 +195,11 @@ namespace http {
|
|||
return out;
|
||||
}
|
||||
|
||||
bool URL::is_i2p() const
|
||||
{
|
||||
return host.rfind(".i2p") == ( host.size() - 4 );
|
||||
}
|
||||
|
||||
void HTTPMsg::add_header(const char *name, std::string & value, bool replace) {
|
||||
add_header(name, value.c_str(), replace);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue