This source file includes following definitions.
- EncodeURL
#include "net/tools/flip_server/spdy_util.h"
#include <string>
#include "net/tools/dump_cache/url_to_filename_encoder.h"
namespace net {
bool g_need_to_encode_url = false;
std::string EncodeURL(std::string uri, std::string host, std::string method) {
if (!g_need_to_encode_url) {
return std::string(method + "_" + uri);
}
std::string filename;
if (uri[0] == '/') {
filename = UrlToFilenameEncoder::Encode(
"http://" + host + uri, method + "_/", false);
} else {
filename = UrlToFilenameEncoder::Encode(uri, method + "_/", false);
}
return filename;
}
}