shrpx: Remove unused function modify_location_header_value

This commit is contained in:
Tatsuhiro Tsujikawa 2012-12-14 01:14:42 +09:00
parent 4d80a26188
commit 3ba73db7d7
2 changed files with 0 additions and 24 deletions

View File

@ -29,7 +29,6 @@
#include "shrpx_config.h"
#include "shrpx_log.h"
#include "util.h"
#include "uri.h"
using namespace spdylay;
@ -109,27 +108,6 @@ std::string create_via_header_value(int major, int minor)
return hdrs;
}
std::string modify_location_header_value(const std::string& uri)
{
std::string norm_uri = uri;
if(util::istartsWith(uri.c_str(), "//")) {
norm_uri.insert(0, "http:");
} else if(!util::istartsWith(uri.c_str(), "http://")) {
return uri;
}
uri::UriStruct us;
if(uri::parse(us, norm_uri)) {
if(util::strieq(us.host.c_str(), get_config()->downstream_host) &&
us.port == get_config()->downstream_port) {
us.protocol = "https";
us.host = get_config()->host;
us.port = get_config()->port;
return uri::construct(us);
}
}
return uri;
}
void capitalize(std::string& s, size_t offset)
{
s[offset] = util::upcase(s[offset]);

View File

@ -37,8 +37,6 @@ std::string create_error_html(int status_code);
std::string create_via_header_value(int major, int minor);
std::string modify_location_header_value(const std::string& uri);
void capitalize(std::string& s, size_t offset);
// Adds ANSI color codes to HTTP headers |hdrs|.