Rebuild HTML man page
[privoxy.git] / parsers.h
1 #ifndef PARSERS_H_INCLUDED
2 #define PARSERS_H_INCLUDED
3 /*********************************************************************
4  *
5  * File        :  $Source: /cvsroot/ijbswa/current/parsers.h,v $
6  *
7  * Purpose     :  Declares functions to parse/crunch headers and pages.
8  *                Functions declared include:
9  *                   `add_to_iob', `client_cookie_adder', `client_from',
10  *                   `client_referrer', `client_send_cookie', `client_ua',
11  *                   `client_uagent', `client_x_forwarded',
12  *                   `client_x_forwarded_adder', `client_xtra_adder',
13  *                   `content_type', `crumble', `destroy_list', `enlist',
14  *                   `flush_socket', `free_http_request', `get_header',
15  *                   `parse_http_request', `sed',
16  *                   and `server_set_cookie'.
17  *
18  * Copyright   :  Written by and Copyright (C) 2001 members of the
19  *                Privoxy team. https://www.privoxy.org/
20  *
21  *                Based on the Internet Junkbuster originally written
22  *                by and Copyright (C) 1997 Anonymous Coders and
23  *                Junkbusters Corporation.  http://www.junkbusters.com
24  *
25  *                This program is free software; you can redistribute it
26  *                and/or modify it under the terms of the GNU General
27  *                Public License as published by the Free Software
28  *                Foundation; either version 2 of the License, or (at
29  *                your option) any later version.
30  *
31  *                This program is distributed in the hope that it will
32  *                be useful, but WITHOUT ANY WARRANTY; without even the
33  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
34  *                PARTICULAR PURPOSE.  See the GNU General Public
35  *                License for more details.
36  *
37  *                The GNU General Public License should be included with
38  *                this file.  If not, you can view it at
39  *                http://www.gnu.org/copyleft/gpl.html
40  *                or write to the Free Software Foundation, Inc., 59
41  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
42  *
43  *********************************************************************/
44
45
46 #include "project.h"
47
48 /* Used for sed()'s second argument. */
49 #define FILTER_CLIENT_HEADERS 0
50 #define FILTER_SERVER_HEADERS 1
51
52 extern long flush_iob(jb_socket fd, struct iob *iob, unsigned int delay);
53 extern int can_add_to_iob(const struct iob *iob, const size_t buffer_limit, size_t n);
54 extern jb_err add_to_iob(struct iob *iob, const size_t buffer_limit, const char *src, long n);
55 extern void clear_iob(struct iob *iob);
56 extern jb_err decompress_iob(struct client_state *csp);
57 extern char *get_header(struct iob *iob);
58 extern char *get_header_value(const struct list *header_list, const char *header_name);
59 extern jb_err sed(struct client_state *csp, int filter_server_headers);
60 #ifdef FEATURE_HTTPS_INSPECTION
61 extern jb_err sed_https(struct client_state *csp);
62 #endif
63 extern jb_err header_adjust_content_length(char **header, size_t content_length);
64 extern jb_err update_server_headers(struct client_state *csp);
65 extern void get_http_time(int time_offset, char *buf, size_t buffer_size);
66 extern jb_err get_destination_from_headers(const struct list *headers, struct http_request *http);
67 #ifdef FEATURE_HTTPS_INSPECTION
68 extern jb_err get_destination_from_https_headers(const struct list *headers, struct http_request *http);
69 #endif
70 extern unsigned long long get_expected_content_length(struct list *headers);
71 extern jb_err client_transfer_encoding(struct client_state *csp, char **header);
72
73 #ifdef FEATURE_FORCE_LOAD
74 extern int strclean(char *string, const char *substring);
75 #endif /* def FEATURE_FORCE_LOAD */
76
77 #endif /* ndef PARSERS_H_INCLUDED */
78
79 /*
80   Local Variables:
81   tab-width: 3
82   end:
83 */