A brief file description. More...
#include "UrlRewrite.h"
#include "ProxyConfig.h"
#include "ReverseProxy.h"
#include "UrlMappingPathIndex.h"
#include "RemapConfig.h"
#include "I_Layout.h"
Go to the source code of this file.
Defines | |
#define | modulePrefix "[ReverseProxy]" |
#define | N_URL_HEADERS 4 |
Used to do the backwards lookups. | |
Functions | |
static void | SetHomePageRedirectFlag (url_mapping *new_mapping, URL &new_to_url) |
Determines where we are in a situation where a virtual path is being mapped to a server home page. | |
void | url_rewrite_remap_request (const UrlMappingContainer &mapping_container, URL *request_url) |
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file UrlRewrite.cc.
#define modulePrefix "[ReverseProxy]" |
Definition at line 31 of file UrlRewrite.cc.
Referenced by UrlRewrite::UrlRewrite().
#define N_URL_HEADERS 4 |
Used to do the backwards lookups.
Definition at line 363 of file UrlRewrite.cc.
static void SetHomePageRedirectFlag | ( | url_mapping * | new_mapping, | |
URL & | new_to_url | |||
) | [static] |
Determines where we are in a situation where a virtual path is being mapped to a server home page.
If it is, we set a special flag instructing us to be on the lookout for the need to send a redirect to if the request URL is a object, opposed to a directory. We need the redirect for an object so that the browser is aware that it is real accessing a directory (albeit a virtual one).
Definition at line 43 of file UrlRewrite.cc.
References url_mapping::fromURL, url_mapping::homePageRedirect, and URL::path_get().
Referenced by UrlRewrite::InsertForwardMapping(), and UrlRewrite::InsertMapping().
void url_rewrite_remap_request | ( | const UrlMappingContainer & | mapping_container, | |
URL * | request_url | |||
) |
Definition at line 287 of file UrlRewrite.cc.
References Debug, UrlMappingContainer::getFromURL(), UrlMappingContainer::getMapping(), UrlMappingContainer::getToURL(), URL::host_get(), URL::host_set(), url_mapping::map_id, memcpy, URL::path_get(), URL::path_set(), URL::port_get_raw(), URL::port_set(), URL::scheme_get(), and URL::scheme_set().
Referenced by UrlRewrite::Remap_redirect(), UrlRewrite::ReverseMap(), and RemapPlugins::run_single_remap().