Lines Matching defs:req
44 struct custom_handle *req = (struct custom_handle *)handle;
48 if (req->body_status != APR_INCOMPLETE)
49 return req->body_status;
51 switch (s = apr_brigade_partition(req->in, bytes, &e)) {
55 apreq_brigade_move(req->tmpbb, req->in, e);
56 req->bytes_read += bytes;
58 if (req->bytes_read > req->read_limit) {
59 req->body_status = APREQ_ERROR_OVERLIMIT;
63 req->body_status =
64 apreq_parser_run(req->parser, req->body, req->tmpbb);
66 apr_brigade_cleanup(req->tmpbb);
70 apreq_brigade_move(req->tmpbb, req->in, e);
71 s = apr_brigade_length(req->tmpbb, 1, &len);
73 req->body_status = s;
76 req->bytes_read += len;
78 if (req->bytes_read > req->read_limit) {
79 req->body_status = APREQ_ERROR_OVERLIMIT;
82 req->body_status =
83 apreq_parser_run(req->parser, req->body, req->tmpbb);
85 apr_brigade_cleanup(req->tmpbb);
89 req->body_status = s;
92 return req->body_status;
99 struct custom_handle *req = (struct custom_handle *)handle;
100 *t = req->jar;
101 return req->jar_status;
106 struct custom_handle *req = (struct custom_handle*)handle;
107 *t = req->args;
108 return req->args_status;
113 struct custom_handle *req = (struct custom_handle*)handle;
114 while (req->body_status == APR_INCOMPLETE)
116 *t = req->body;
117 return req->body_status;
124 struct custom_handle *req = (struct custom_handle*)handle;
127 if (req->jar == NULL || name == NULL)
130 val = apr_table_get(req->jar, name);
140 struct custom_handle *req = (struct custom_handle*)handle;
143 if (req->args == NULL || name == NULL)
146 val = apr_table_get(req->args, name);
156 struct custom_handle *req = (struct custom_handle*)handle;
159 if (req->body == NULL || name == NULL)
163 *(const char **)&val = apr_table_get(req->body, name);
167 if (req->body_status == APR_INCOMPLETE)
181 struct custom_handle *req = (struct custom_handle*)handle;
182 *parser = req->parser;
198 struct custom_handle *req = (struct custom_handle*)handle;
199 apreq_parser_add_hook(req->parser, hook);
206 struct custom_handle *req = (struct custom_handle*)handle;
207 *bytes = req->parser->brigade_limit;
222 struct custom_handle *req = (struct custom_handle*)handle;
223 *bytes = req->read_limit;
238 struct custom_handle *req = (struct custom_handle*)handle;
240 *path = req->parser->temp_dir;
262 struct custom_handle *req;
263 req = apr_palloc(pool, sizeof(*req));
264 req->handle.module = &custom_module;
265 req->handle.pool = pool;
266 req->handle.bucket_alloc = in->bucket_alloc;
267 req->read_limit = read_limit;
268 req->bytes_read = 0;
269 req->parser = parser;
270 req->in = apr_brigade_create(pool, in->bucket_alloc);
271 req->tmpbb = apr_brigade_create(pool, in->bucket_alloc);
272 req->body = apr_table_make(pool, APREQ_DEFAULT_NELTS);
273 req->body_status = APR_INCOMPLETE;
274 APR_BRIGADE_CONCAT(req->in, in);
277 req->jar = apr_table_make(pool, APREQ_DEFAULT_NELTS);
278 req->jar_status =
279 apreq_parse_cookie_header(pool, req->jar, cookie);
282 req->jar = NULL;
283 req->jar_status = APREQ_ERROR_NODATA;
288 req->args = apr_table_make(pool, APREQ_DEFAULT_NELTS);
289 req->args_status =
290 apreq_parse_query_string(pool, req->args, query_string);
293 req->args = NULL;
294 req->args_status = APREQ_ERROR_NODATA;
297 if (!APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(req->in))) {
299 APR_BRIGADE_INSERT_TAIL(req->in, eos);
302 return &req->handle;