mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
parent
5a6bd38d22
commit
b1aeae6772
4 changed files with 1 additions and 190 deletions
29
util.h
29
util.h
|
@ -22,7 +22,6 @@ namespace i2p
|
|||
{
|
||||
namespace util
|
||||
{
|
||||
|
||||
/**
|
||||
wrapper arround boost::lexical_cast that "never" fails
|
||||
*/
|
||||
|
@ -34,34 +33,6 @@ namespace util
|
|||
return fallback;
|
||||
}
|
||||
}
|
||||
|
||||
namespace http
|
||||
{
|
||||
// in (lower case)
|
||||
const char ETAG[] = "etag"; // ETag
|
||||
const char LAST_MODIFIED[] = "last-modified"; // Last-Modified
|
||||
const char TRANSFER_ENCODING[] = "transfer-encoding"; // Transfer-Encoding
|
||||
const char CONTENT_ENCODING[] = "content-encoding"; // Content-Encoding
|
||||
// out
|
||||
const char IF_NONE_MATCH[] = "If-None-Match";
|
||||
const char IF_MODIFIED_SINCE[] = "If-Modified-Since";
|
||||
|
||||
std::string GetHttpContent (std::istream& response);
|
||||
void MergeChunkedResponse (std::istream& response, std::ostream& merged);
|
||||
std::string urlDecode(const std::string& data);
|
||||
|
||||
struct url {
|
||||
url(const std::string& url_s); // omitted copy, ==, accessors, ...
|
||||
private:
|
||||
void parse(const std::string& url_s);
|
||||
public:
|
||||
std::string protocol_, host_, path_, query_;
|
||||
std::string portstr_;
|
||||
unsigned int port_;
|
||||
std::string user_;
|
||||
std::string pass_;
|
||||
};
|
||||
}
|
||||
|
||||
namespace net
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue