A brief file description. More...
#include "P_RecProcess.h"
#include "ink_hash_table.h"
#include "ink_defs.h"
#include "HttpTransact.h"
#include "RemapPluginInfo.h"
#include "UrlRewrite.h"
#include "UrlMapping.h"
Go to the source code of this file.
Defines | |
#define | EMPTY_PORT_MAPPING (int32_t)~0 |
Functions | |
int | init_reverse_proxy () |
bool | request_url_remap (HttpTransact::State *s, HTTPHdr *request_header, char **redirect_url, unsigned int filter_mask=URL_REMAP_FILTER_NONE) |
mapping_type | request_url_remap_redirect (HTTPHdr *request_header, URL *redirect_url) |
This function is used to figure out if a URL needs to be remapped according to the rules in remap.config. | |
bool | response_url_remap (HTTPHdr *response_header) |
void | reloadUrlRewrite () |
Called when the remap.config file changes. | |
int | url_rewrite_CB (const char *name, RecDataT data_type, RecData data, void *cookie) |
Variables | |
int | url_remap_mode |
UrlRewrite * | rewrite_table |
remap_plugin_info * | remap_pi_list |
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 ReverseProxy.h.
#define EMPTY_PORT_MAPPING (int32_t)~0 |
Definition at line 45 of file ReverseProxy.h.
int init_reverse_proxy | ( | ) |
Definition at line 73 of file ReverseProxy.cc.
References AC_PORT_CHANGED, DEFAULT_TO_PAC_CHANGED, DEFAULT_TO_PAC_PORT_CHANGED, FILE_CHANGED, HTTP_DEFAULT_REDIRECT_CHANGED, ink_assert, UrlRewrite::is_valid(), new_ProxyMutex(), REC_RegisterConfigUpdateFunc, REVERSE_CHANGED, TSNAME_CHANGED, URL_REMAP_MODE_CHANGED, url_rewrite_CB(), and Warning.
Referenced by init_HttpProxyServer().
void reloadUrlRewrite | ( | ) |
Called when the remap.config file changes.
Since it called infrequently, we do the load of new file as blocking I/O and lock aquire is also blocking.
Definition at line 156 of file ReverseProxy.cc.
References Debug, UrlRewrite::is_valid(), new_Deleter(), URL_REWRITE_TIMEOUT, and Warning.
Referenced by UR_UpdateContinuation::file_update_handler().
bool request_url_remap | ( | HttpTransact::State * | s, | |
HTTPHdr * | request_header, | |||
char ** | redirect_url, | |||
unsigned int | filter_mask = URL_REMAP_FILTER_NONE | |||
) |
Definition at line 102 of file ReverseProxy.cc.
Referenced by HttpTransact::HandleBlindTunnel(), and how_to_open_connection().
mapping_type request_url_remap_redirect | ( | HTTPHdr * | request_header, | |
URL * | redirect_url | |||
) |
This function is used to figure out if a URL needs to be remapped according to the rules in remap.config.
Definition at line 114 of file ReverseProxy.cc.
References UrlRewrite::Remap_redirect().
Referenced by HttpTransact::handleIfRedirect().
bool response_url_remap | ( | HTTPHdr * | response_header | ) |
Definition at line 120 of file ReverseProxy.cc.
References UrlRewrite::ReverseMap().
Referenced by HttpTransact::build_response().
Definition at line 175 of file ReverseProxy.cc.
References AC_PORT_CHANGED, DEFAULT_TO_PAC_CHANGED, DEFAULT_TO_PAC_PORT_CHANGED, ET_TASK, eventProcessor, FILE_CHANGED, HTTP_DEFAULT_REDIRECT_CHANGED, ink_assert, RecData::rec_int, REVERSE_CHANGED, EventProcessor::schedule_imm(), UrlRewrite::SetReverseFlag(), TSNAME_CHANGED, and URL_REMAP_MODE_CHANGED.
Referenced by init_reverse_proxy().
Definition at line 53 of file ReverseProxy.cc.
Referenced by remap_load_plugin().
Definition at line 52 of file ReverseProxy.cc.
Referenced by RemapProcessor::finish_remap(), and RemapProcessor::setup_for_remap().
int url_remap_mode |
Definition at line 66 of file ReverseProxy.cc.
Referenced by HttpTransact::HandleBlindTunnel(), how_to_open_connection(), HttpSM::set_next_state(), HttpTransact::StartRemapRequest(), and UrlRewrite::UrlRewrite().