]> granicus.if.org Git - apache/blob - modules/apreq/apreq_private_apache2.h
Add lots of unique tags to error log messages
[apache] / modules / apreq / apreq_private_apache2.h
1 extern module AP_MODULE_DECLARE_DATA apreq_module;
2
3 struct dir_config {
4     const char         *temp_dir;
5     apr_uint64_t        read_limit;
6     apr_size_t          brigade_limit;
7 };
8
9 /* The "warehouse", stored in r->request_config */
10 struct apache2_handle {
11     apreq_handle_t      handle;
12     request_rec        *r;
13     apr_table_t        *jar, *args;
14     apr_status_t        jar_status, args_status;
15     ap_filter_t        *f;
16 };
17
18 /* Tracks the apreq filter state */
19 struct filter_ctx {
20     apr_bucket_brigade *bb;    /* input brigade that's passed to the parser */
21     apr_bucket_brigade *bbtmp; /* temporary copy of bb, destined for the spool */
22     apr_bucket_brigade *spool; /* copied prefetch data for downstream filters */
23     apreq_parser_t     *parser;
24     apreq_hook_t       *hook_queue;
25     apreq_hook_t       *find_param;
26     apr_table_t        *body;
27     apr_status_t        body_status;
28     apr_status_t        filter_error;
29     apr_uint64_t        bytes_read;     /* Total bytes read into this filter. */
30     apr_uint64_t        read_limit;     /* Max bytes the filter may show to parser */
31     apr_size_t          brigade_limit;
32     const char         *temp_dir;
33 };
34
35 apr_status_t apreq_filter_prefetch(ap_filter_t *f, apr_off_t readbytes);
36 apr_status_t apreq_filter(ap_filter_t *f,
37                           apr_bucket_brigade *bb,
38                           ap_input_mode_t mode,
39                           apr_read_type_e block,
40                           apr_off_t readbytes);
41
42 void apreq_filter_make_context(ap_filter_t *f);
43 void apreq_filter_init_context(ap_filter_t *f);
44
45 APR_INLINE
46 static void apreq_filter_relocate(ap_filter_t *f)
47 {
48     request_rec *r = f->r;
49
50     if (f != r->input_filters) {
51         ap_filter_t *top = r->input_filters;
52         ap_remove_input_filter(f);
53         r->input_filters = f;
54         f->next = top;
55     }
56 }