mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
add is_i2p
This commit is contained in:
parent
b14d1801f0
commit
1500e805dd
@ -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);
|
||||
}
|
||||
|
@ -56,6 +56,11 @@ namespace http
|
||||
* @note Returns relative url if schema if empty, absolute url otherwise
|
||||
*/
|
||||
std::string to_string ();
|
||||
|
||||
/**
|
||||
* @brief return true if the host is inside i2p
|
||||
*/
|
||||
bool is_i2p() const;
|
||||
};
|
||||
|
||||
struct HTTPMsg
|
||||
|
Loading…
Reference in New Issue
Block a user