Got rid of RequestContext::full_url

This commit is contained in:
Veloman Yunkan 2023-02-08 21:35:29 +01:00
parent 05a66ead6e
commit 02f631fdb6
2 changed files with 1 additions and 4 deletions

View File

@ -57,7 +57,6 @@ RequestContext::RequestContext(struct MHD_Connection* connection,
const std::string& _method,
const std::string& version) :
rootLocation(_rootLocation),
full_url(_rootLocation + urlEncode(unrootedUrl)),
url(unrootedUrl),
method(str2RequestMethod(_method)),
version(version),
@ -137,7 +136,6 @@ void RequestContext::print_debug_info() const {
printf("\n");
}
printf("Parsed : \n");
printf("full_url: %s\n", full_url.c_str());
printf("url : %s\n", url.c_str());
printf("acceptEncodingGzip : %d\n", acceptEncodingGzip);
printf("has_range : %d\n", byteRange_.kind() != ByteRange::NONE);
@ -175,7 +173,7 @@ std::string RequestContext::get_url_part(int number) const {
}
std::string RequestContext::get_full_url() const {
return full_url;
return rootLocation + urlEncode(url);
}
std::string RequestContext::get_root_path() const {

View File

@ -138,7 +138,6 @@ class RequestContext {
private: // data
std::string rootLocation;
std::string full_url;
std::string url;
RequestMethod method;
std::string version;