Lines Matching refs:handle

54     struct apreq_handle_t       handle;
121 we take the promptstring defined in the handle and interpolate variables as
143 static char *prompt(apreq_handle_t *handle, const char *name,
145 struct cgi_handle *req = (struct cgi_handle *)handle;
248 return apr_pstrdup(handle->pool, buf[0]);
253 return apr_pstrdup(handle->pool, defval);
258 static const char *cgi_header_in(apreq_handle_t *handle,
261 apr_pool_t *p = handle->pool;
286 apr_status_t status, apreq_handle_t *handle,
289 apr_pool_t *p = handle->pool;
337 static const char *cgi_query_string(apreq_handle_t *handle)
340 apr_env_get(&value, qs, handle->pool);
345 static void init_body(apreq_handle_t *handle)
347 struct cgi_handle *req = (struct cgi_handle *)handle;
348 const char *cl_header = cgi_header_in(handle, "Content-Length");
349 apr_bucket_alloc_t *ba = handle->bucket_alloc;
350 apr_pool_t *pool = handle->pool;
360 cgi_log_error(CGILOG_MARK, CGILOG_ERR, req->body_status, handle,
366 cgi_log_error(CGILOG_MARK, CGILOG_ERR, req->body_status, handle,
375 const char *ct_header = cgi_header_in(handle, "Content-Type");
423 static apr_status_t cgi_read(apreq_handle_t *handle,
426 struct cgi_handle *req = (struct cgi_handle *)handle;
431 init_body(handle);
448 handle, "Bytes read (%" APR_UINT64_T_FMT
473 cgi_log_error(CGILOG_MARK, CGILOG_ERR, req->body_status, handle,
495 static apr_status_t cgi_jar(apreq_handle_t *handle,
498 struct cgi_handle *req = (struct cgi_handle *)handle;
514 name = apr_pstrdup(handle->pool, buf);
515 val = prompt(handle, name, "cookie");
518 p = apreq_cookie_make(handle->pool, name, strlen(name), val, strlen(val));
526 const char *cookies = cgi_header_in(handle, "Cookie");
529 apreq_parse_cookie_header(handle->pool, req->jar, cookies);
539 static apr_status_t cgi_args(apreq_handle_t *handle,
542 struct cgi_handle *req = (struct cgi_handle *)handle;
558 name = apr_pstrdup(handle->pool, buf);
559 val = prompt(handle, name, "parameter");
562 p = apreq_param_make(handle->pool, name, strlen(name), val, strlen(val));
571 const char *qs = cgi_query_string(handle);
574 apreq_parse_query_string(handle->pool, req->args, qs);
587 static apreq_cookie_t *cgi_jar_get(apreq_handle_t *handle,
590 struct cgi_handle *req = (struct cgi_handle *)handle;
595 cgi_jar(handle, &t);
605 val = prompt(handle, name, "cookie");
608 p = apreq_cookie_make(handle->pool, name, strlen(name), val, strlen(val));
619 static apreq_param_t *cgi_args_get(apreq_handle_t *handle,
622 struct cgi_handle *req = (struct cgi_handle *)handle;
627 cgi_args(handle, &t);
637 val = prompt(handle, name, "parameter");
640 p = apreq_param_make(handle->pool, name, strlen(name), val, strlen(val));
653 static apr_status_t cgi_body(apreq_handle_t *handle,
656 struct cgi_handle *req = (struct cgi_handle *)handle;
672 name = apr_pstrdup(handle->pool, buf);
673 val = prompt(handle, name, "parameter");
676 p = apreq_param_make(handle->pool, name, strlen(name), val, strlen(val));
687 init_body(handle);
692 while (cgi_read(handle, APREQ_DEFAULT_READ_BLOCK_SIZE)
701 static apreq_param_t *cgi_body_get(apreq_handle_t *handle,
704 struct cgi_handle *req = (struct cgi_handle *)handle;
715 val = prompt(handle, name, "parameter");
718 p = apreq_param_make(handle->pool, name, strlen(name), val, strlen(val));
739 init_body(handle);
742 cgi_read(handle, APREQ_DEFAULT_READ_BLOCK_SIZE);
754 hook_ctx = apr_palloc(handle->pool, sizeof *hook_ctx);
757 req->find_param = apreq_hook_make(handle->pool,
769 cgi_read(handle, APREQ_DEFAULT_READ_BLOCK_SIZE);
793 static apr_status_t cgi_parser_get(apreq_handle_t *handle,
796 struct cgi_handle *req = (struct cgi_handle *)handle;
802 static apr_status_t cgi_parser_set(apreq_handle_t *handle,
805 struct cgi_handle *req = (struct cgi_handle *)handle;
830 static apr_status_t cgi_hook_add(apreq_handle_t *handle,
833 struct cgi_handle *req = (struct cgi_handle *)handle;
851 static apr_status_t cgi_brigade_limit_set(apreq_handle_t *handle,
854 struct cgi_handle *req = (struct cgi_handle *)handle;
867 static apr_status_t cgi_brigade_limit_get(apreq_handle_t *handle,
870 struct cgi_handle *req = (struct cgi_handle *)handle;
878 static apr_status_t cgi_read_limit_set(apreq_handle_t *handle,
881 struct cgi_handle *req = (struct cgi_handle *)handle;
892 static apr_status_t cgi_read_limit_get(apreq_handle_t *handle,
895 struct cgi_handle *req = (struct cgi_handle *)handle;
901 static apr_status_t cgi_temp_dir_set(apreq_handle_t *handle,
904 struct cgi_handle *req = (struct cgi_handle *)handle;
912 *temp_dir = apr_pstrdup(handle->pool, path);
920 static apr_status_t cgi_temp_dir_get(apreq_handle_t *handle,
923 struct cgi_handle *req = (struct cgi_handle *)handle;
963 /** handle else? (!SUCCESS && !ENOENT) */
985 req->handle.module = &cgi_module;
986 req->handle.pool = pool;
987 req->handle.bucket_alloc = ba;
1006 apr_pool_userdata_setn(&req->handle, USER_DATA_KEY, NULL, pool);
1012 return &req->handle;