[BB#63] conf: Allow multiple Listen statements in the config.
[obnox/tinyproxy.git] / src / reverse-proxy.h
1 /* tinyproxy - A fast light-weight HTTP proxy
2  * Copyright (C) 2005 Robert James Kaes <rjkaes@users.sourceforge.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 /* See 'reverse-proxy.c' for detailed information. */
20
21 #ifndef TINYPROXY_REVERSE_PROXY_H
22 #define TINYPROXY_REVERSE_PROXY_H
23
24 #include "conns.h"
25
26 struct reversepath {
27         struct reversepath *next;
28         char *path;
29         char *url;
30 };
31
32 #define REVERSE_COOKIE "yummy_magical_cookie"
33
34 extern void reversepath_add (const char *path, const char *url,
35                              struct reversepath **reversepath_list);
36 extern struct reversepath *reversepath_get (char *url,
37                                             struct reversepath *reverse);
38 void free_reversepath_list (struct reversepath *reverse);
39 extern char *reverse_rewrite_url (struct conn_s *connptr,
40                                   hashmap_t hashofheaders, char *url);
41
42 #endif