Net: near complete merge to 1.4.2

This commit is contained in:
Marian Krivos
2011-09-14 18:20:11 +00:00
parent 56c6a4f758
commit b242f2c8d1
192 changed files with 15545 additions and 2277 deletions

View File

@@ -1,7 +1,7 @@
//
// HTTPCookie.cpp
//
// $Id: //poco/Main/Net/src/HTTPCookie.cpp#9 $
// $Id: //poco/1.4/Net/src/HTTPCookie.cpp#1 $
//
// Library: Net
// Package: HTTP
@@ -44,6 +44,7 @@
#include "Poco/NumberFormatter.h"
#include "Poco/NumberParser.h"
#include "Poco/String.h"
#include "Poco/URI.h"
using Poco::Timestamp;
@@ -315,4 +316,26 @@ std::string HTTPCookie::toString() const
}
namespace
{
static const std::string ILLEGAL_CHARS("()[]/|\\',;");
}
std::string HTTPCookie::escape(const std::string& str)
{
std::string result;
Poco::URI::encode(str, ILLEGAL_CHARS, result);
return result;
}
std::string HTTPCookie::unescape(const std::string& str)
{
std::string result;
Poco::URI::decode(str, result);
return result;
}
} } // namespace Poco::Net