summaryrefslogtreecommitdiffstats
path: root/modules/http
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@apache.org>2001-02-08 08:45:33 +0100
committerDoug MacEachern <dougm@apache.org>2001-02-08 08:45:33 +0100
commit88d3406f9a35c503b9f0e3f125aacdaa05df9371 (patch)
tree39470637773d75d2fc514c333a1af2554f92775c /modules/http
parentscoreboard.h says it is extern (and scoreboard.c instantiates it), (diff)
downloadapache2-88d3406f9a35c503b9f0e3f125aacdaa05df9371.tar.xz
apache2-88d3406f9a35c503b9f0e3f125aacdaa05df9371.zip
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r--modules/http/error_bucket.c6
-rw-r--r--modules/http/http_core.c88
-rw-r--r--modules/http/http_protocol.c88
-rw-r--r--modules/http/http_request.c12
-rw-r--r--modules/http/mod_mime.c46
5 files changed, 120 insertions, 120 deletions
diff --git a/modules/http/error_bucket.c b/modules/http/error_bucket.c
index 8d3c6742e0..38b39f8927 100644
--- a/modules/http/error_bucket.c
+++ b/modules/http/error_bucket.c
@@ -98,7 +98,7 @@ AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_error = {
"ERROR", 5,
free,
error_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_notimpl,
- apr_bucket_copy_notimpl
+ apr_bucket_notimpl_setaside,
+ apr_bucket_notimpl_split,
+ apr_bucket_notimpl_copy
};
diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index 8d38a6a8e9..15d2f04cb9 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -155,7 +155,7 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)
conf->limit_req_body = 0;
conf->limit_xml_body = AP_LIMIT_UNSET;
- conf->sec = apr_make_array(a, 2, sizeof(void *));
+ conf->sec = apr_array_make(a, 2, sizeof(void *));
#ifdef WIN32
conf->script_interpreter_source = INTERPRETER_SOURCE_UNSET;
#endif
@@ -165,8 +165,8 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)
conf->add_default_charset = ADD_DEFAULT_CHARSET_UNSET;
conf->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME;
- conf->output_filters = apr_make_array(a, 2, sizeof(void *));
- conf->input_filters = apr_make_array(a, 2, sizeof(void *));
+ conf->output_filters = apr_array_make(a, 2, sizeof(void *));
+ conf->input_filters = apr_array_make(a, 2, sizeof(void *));
return (void *)conf;
}
@@ -284,7 +284,7 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
else
conf->limit_xml_body = base->limit_xml_body;
- conf->sec = apr_append_arrays(a, base->sec, new->sec);
+ conf->sec = apr_array_append(a, base->sec, new->sec);
if (new->satisfy != SATISFY_NOSPEC) {
conf->satisfy = new->satisfy;
@@ -306,9 +306,9 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
conf->add_default_charset_name = new->add_default_charset_name;
}
}
- conf->output_filters = apr_append_arrays(a, base->output_filters,
+ conf->output_filters = apr_array_append(a, base->output_filters,
new->output_filters);
- conf->input_filters = apr_append_arrays(a, base->input_filters,
+ conf->input_filters = apr_array_append(a, base->input_filters,
new->input_filters);
return (void*)conf;
@@ -325,8 +325,8 @@ static void *create_core_server_config(apr_pool_t *a, server_rec *s)
#endif
conf->access_name = is_virtual ? NULL : DEFAULT_ACCESS_FNAME;
conf->ap_document_root = is_virtual ? NULL : DOCUMENT_LOCATION;
- conf->sec = apr_make_array(a, 40, sizeof(void *));
- conf->sec_url = apr_make_array(a, 40, sizeof(void *));
+ conf->sec = apr_array_make(a, 40, sizeof(void *));
+ conf->sec_url = apr_array_make(a, 40, sizeof(void *));
return (void *)conf;
}
@@ -345,8 +345,8 @@ static void *merge_core_server_configs(apr_pool_t *p, void *basev, void *virtv)
if (!conf->ap_document_root) {
conf->ap_document_root = base->ap_document_root;
}
- conf->sec = apr_append_arrays(p, base->sec, virt->sec);
- conf->sec_url = apr_append_arrays(p, base->sec_url, virt->sec_url);
+ conf->sec = apr_array_append(p, base->sec, virt->sec);
+ conf->sec_url = apr_array_append(p, base->sec_url, virt->sec_url);
return conf;
}
@@ -359,7 +359,7 @@ AP_CORE_DECLARE(void) ap_add_per_dir_conf(server_rec *s, void *dir_config)
{
core_server_config *sconf = ap_get_module_config(s->module_config,
&core_module);
- void **new_space = (void **)apr_push_array(sconf->sec);
+ void **new_space = (void **)apr_array_push(sconf->sec);
*new_space = dir_config;
}
@@ -368,14 +368,14 @@ AP_CORE_DECLARE(void) ap_add_per_url_conf(server_rec *s, void *url_config)
{
core_server_config *sconf = ap_get_module_config(s->module_config,
&core_module);
- void **new_space = (void **)apr_push_array(sconf->sec_url);
+ void **new_space = (void **)apr_array_push(sconf->sec_url);
*new_space = url_config;
}
AP_CORE_DECLARE(void) ap_add_file_conf(core_dir_config *conf, void *url_config)
{
- void **new_space = (void **)apr_push_array(conf->sec);
+ void **new_space = (void **)apr_array_push(conf->sec);
*new_space = url_config;
}
@@ -465,7 +465,7 @@ void ap_core_reorder_directories(apr_pool_t *p, server_rec *s)
elts = (void **)sec->elts;
/* we have to allocate tmp space to do a stable sort */
- apr_create_pool(&tmp, p);
+ apr_pool_create(&tmp, p);
sortbin = apr_palloc(tmp, sec->nelts * sizeof(*sortbin));
for (i = 0; i < nelts; ++i) {
sortbin[i].orig_index = i;
@@ -479,7 +479,7 @@ void ap_core_reorder_directories(apr_pool_t *p, server_rec *s)
elts[i] = sortbin[i].elt;
}
- apr_destroy_pool(tmp);
+ apr_pool_destroy(tmp);
}
/*****************************************************************
@@ -598,7 +598,7 @@ static apr_inline void do_double_reverse (conn_rec *conn)
conn->double_reverse = -1;
return;
}
- rv = apr_getaddrinfo(&sa, conn->remote_host, APR_UNSPEC, 0, 0, conn->pool);
+ rv = apr_sockaddr_info_get(&sa, conn->remote_host, APR_UNSPEC, 0, 0, conn->pool);
if (rv == APR_SUCCESS) {
while (sa) {
if (sa->ipaddr_len == conn->remote_addr->ipaddr_len &&
@@ -638,7 +638,7 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config,
|| hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
apr_sockaddr_t *remote_addr;
- apr_get_sockaddr(&remote_addr, APR_REMOTE, conn->client_socket);
+ apr_socket_addr_get(&remote_addr, APR_REMOTE, conn->client_socket);
if (apr_getnameinfo(&conn->remote_host, remote_addr, 0) == APR_SUCCESS) {
ap_str_tolower(conn->remote_host);
@@ -727,7 +727,7 @@ AP_DECLARE(const char *) ap_get_server_name(request_rec *r)
if (conn->local_host == NULL) {
apr_sockaddr_t *local_addr;
- apr_get_sockaddr(&local_addr, APR_LOCAL, conn->client_socket);
+ apr_socket_addr_get(&local_addr, APR_LOCAL, conn->client_socket);
if (apr_getnameinfo(&conn->local_host, local_addr, 0) != APR_SUCCESS)
conn->local_host = apr_pstrdup(conn->pool, r->server->server_hostname);
else {
@@ -753,8 +753,8 @@ AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r)
if (r->hostname) {
apr_sockaddr_t *localsa;
- apr_get_sockaddr(&localsa, APR_LOCAL, r->connection->client_socket);
- apr_get_port(&port, localsa);
+ apr_socket_addr_get(&localsa, APR_LOCAL, r->connection->client_socket);
+ apr_sockaddr_port_get(&port, localsa);
}
}
/* default */
@@ -1430,9 +1430,9 @@ static const char *require(cmd_parms *cmd, void *c_, const char *arg)
core_dir_config *c=c_;
if (!c->ap_requires) {
- c->ap_requires = apr_make_array(cmd->pool, 2, sizeof(require_line));
+ c->ap_requires = apr_array_make(cmd->pool, 2, sizeof(require_line));
}
- r = (require_line *)apr_push_array(c->ap_requires);
+ r = (require_line *)apr_array_push(c->ap_requires);
r->requirement = apr_pstrdup(cmd->pool, arg);
r->method_mask = cmd->limited;
return NULL;
@@ -1466,10 +1466,10 @@ AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dumm
*/
if (!tog) {
if (cmd->limited_xmethods == NULL) {
- cmd->limited_xmethods = apr_make_array(cmd->pool, 2,
+ cmd->limited_xmethods = apr_array_make(cmd->pool, 2,
sizeof(char *));
}
- xmethod = (char **) apr_push_array(cmd->limited_xmethods);
+ xmethod = (char **) apr_array_push(cmd->limited_xmethods);
*xmethod = apr_pstrdup(cmd->pool, method);
}
/*
@@ -1868,10 +1868,10 @@ static const char *set_server_alias(cmd_parms *cmd, void *dummy,
while (*arg) {
char **item, *name = ap_getword_conf(cmd->pool, &arg);
if (ap_is_matchexp(name)) {
- item = (char **)apr_push_array(cmd->server->wild_names);
+ item = (char **)apr_array_push(cmd->server->wild_names);
}
else {
- item = (char **)apr_push_array(cmd->server->names);
+ item = (char **)apr_array_push(cmd->server->names);
}
*item = name;
}
@@ -1883,7 +1883,7 @@ static const char *add_filter(cmd_parms *cmd, void *dummy, const char *arg)
core_dir_config *conf = dummy;
char **newfilter;
- newfilter = (char **)apr_push_array(conf->output_filters);
+ newfilter = (char **)apr_array_push(conf->output_filters);
*newfilter = apr_pstrdup(cmd->pool, arg);
return NULL;
}
@@ -1893,7 +1893,7 @@ static const char *add_input_filter(cmd_parms *cmd, void *dummy, const char *arg
core_dir_config *conf = dummy;
char **newfilter;
- newfilter = (char **)apr_push_array(conf->input_filters);
+ newfilter = (char **)apr_array_push(conf->input_filters);
*newfilter = apr_pstrdup(cmd->pool, arg);
return NULL;
}
@@ -2270,8 +2270,8 @@ AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *compone
* we are adding the original SERVER_BASEVERSION string.
*/
if (server_version == NULL) {
- apr_register_cleanup(pconf, NULL, reset_version,
- apr_null_cleanup);
+ apr_pool_cleanup_register(pconf, NULL, reset_version,
+ apr_pool_cleanup_null);
server_version = apr_pstrdup(pconf, component);
}
else {
@@ -2677,7 +2677,7 @@ static apr_status_t send_the_file(conn_rec *c, apr_file_t *fd,
/* Seek the file to 'offset' */
if (offset != 0 && rv == APR_SUCCESS) {
- rv = apr_seek(fd, APR_SET, &offset);
+ rv = apr_file_seek(fd, APR_SET, &offset);
}
/* Send the file, making sure to handle partial writes */
@@ -2685,7 +2685,7 @@ static apr_status_t send_the_file(conn_rec *c, apr_file_t *fd,
while (rv == APR_SUCCESS && togo) {
sendlen = togo > sizeof(buffer) ? sizeof(buffer) : togo;
o = 0;
- rv = apr_read(fd, buffer, &sendlen);
+ rv = apr_file_read(fd, buffer, &sendlen);
while (rv == APR_SUCCESS && sendlen) {
bytes_sent = sendlen;
rv = apr_send(c->client_socket, &buffer[o], &bytes_sent);
@@ -3006,7 +3006,7 @@ static int default_handler(request_rec *r)
return HTTP_METHOD_NOT_ALLOWED;
}
- if ((status = apr_open(&fd, r->filename, APR_READ | APR_BINARY, 0, r->connection->pool)) != APR_SUCCESS) {
+ if ((status = apr_file_open(&fd, r->filename, APR_READ | APR_BINARY, 0, r->connection->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
"file permissions deny server access: %s", r->filename);
return HTTP_FORBIDDEN;
@@ -3017,7 +3017,7 @@ static int default_handler(request_rec *r)
apr_table_setn(r->headers_out, "Accept-Ranges", "bytes");
ap_set_content_length(r, r->finfo.size);
if ((errstatus = ap_meets_conditions(r)) != OK) {
- apr_close(fd);
+ apr_file_close(fd);
return errstatus;
}
@@ -3027,10 +3027,10 @@ static int default_handler(request_rec *r)
}
bb = apr_brigade_create(r->pool);
- e = apr_bucket_create_file(fd, 0, r->finfo.size);
+ e = apr_bucket_file_create(fd, 0, r->finfo.size);
APR_BRIGADE_INSERT_HEAD(bb, e);
- e = apr_bucket_create_eos();
+ e = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
return ap_pass_brigade(r->output_filters, bb);
@@ -3139,7 +3139,7 @@ static apr_status_t coalesce_filter(ap_filter_t *f, apr_bucket_brigade *b)
if (pass_the_brigade) {
/* Insert ctx->buf into the correct spot in the brigade */
- e = apr_bucket_create_pool(ctx->buf, ctx->cnt, p);
+ e = apr_bucket_pool_create(ctx->buf, ctx->cnt, p);
if (insert_first) {
APR_BRIGADE_INSERT_HEAD(b, e);
}
@@ -3245,14 +3245,14 @@ static apr_status_t chunk_filter(ap_filter_t *f, apr_bucket_brigade *b)
hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr),
"%qx" CRLF, (apr_uint64_t)bytes);
ap_xlate_proto_to_ascii(chunk_hdr, hdr_len);
- e = apr_bucket_create_transient(chunk_hdr, hdr_len);
+ e = apr_bucket_transient_create(chunk_hdr, hdr_len);
APR_BRIGADE_INSERT_HEAD(b, e);
/*
* Insert the end-of-chunk CRLF before the EOS bucket, or
* appended to the brigade
*/
- e = apr_bucket_create_immortal(ASCII_CRLF, 2);
+ e = apr_bucket_immortal_create(ASCII_CRLF, 2);
if (eos != NULL) {
APR_BUCKET_INSERT_BEFORE(eos, e);
}
@@ -3276,7 +3276,7 @@ static apr_status_t chunk_filter(ap_filter_t *f, apr_bucket_brigade *b)
*/
if (eos != NULL) {
/* XXX: (2) trailers ... does not yet exist */
- e = apr_bucket_create_immortal(ASCII_ZERO ASCII_CRLF /* <trailers> */ ASCII_CRLF, 5);
+ e = apr_bucket_immortal_create(ASCII_ZERO ASCII_CRLF /* <trailers> */ ASCII_CRLF, 5);
APR_BUCKET_INSERT_BEFORE(eos, e);
}
@@ -3296,7 +3296,7 @@ static int core_input_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mod
if (!f->ctx) { /* If we haven't passed up the socket yet... */
f->ctx = (void *)1;
- e = apr_bucket_create_socket(f->c->client_socket);
+ e = apr_bucket_socket_create(f->c->client_socket);
APR_BRIGADE_INSERT_TAIL(b, e);
return APR_SUCCESS;
}
@@ -3474,7 +3474,7 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
flags); /* apr_sendfile flags */
/* If apr_sendfile() returns APR_ENOTIMPL, call send_the_file()
- * to loop on apr_read/apr_send to send the file. Our Windows
+ * to loop on apr_file_read/apr_send to send the file. Our Windows
* binary distributions (which work on Windows 9x/NT) are
* compiled on Windows NT. TransmitFile is not available on
* Windows 95/98 and we discover this at runtime when
@@ -3517,8 +3517,8 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
static void core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
- apr_init_bucket_types(pconf);
- apr_insert_bucket_type(&ap_bucket_type_error);
+ apr_bucket_init_types(pconf);
+ apr_bucket_insert_type(&ap_bucket_type_error);
}
static void core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index 668be6bced..951de01523 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -237,7 +237,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
bsend = apr_brigade_create(r->pool);
e = ap_bucket_create_error(HTTP_RANGE_NOT_SATISFIABLE, NULL, r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
- e = apr_bucket_create_eos();
+ e = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bsend, e);
return ap_pass_brigade(f->next, bsend);
}
@@ -316,14 +316,14 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
if (ctx->num_ranges > 1) {
char *ts;
- e = apr_bucket_create_pool(bound_head,
+ e = apr_bucket_pool_create(bound_head,
strlen(bound_head), r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
ts = apr_psprintf(r->pool, BYTERANGE_FMT CRLF CRLF,
range_start, range_end, clength);
ap_xlate_proto_to_ascii(ts, strlen(ts));
- e = apr_bucket_create_pool(ts, strlen(ts), r->pool);
+ e = apr_bucket_pool_create(ts, strlen(ts), r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
}
@@ -338,7 +338,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
if (apr_bucket_copy(ec, &foo) != APR_SUCCESS) {
apr_bucket_read(ec, &str, &len, APR_BLOCK_READ);
- foo = apr_bucket_create_heap(str, len, 0, NULL);
+ foo = apr_bucket_heap_create(str, len, 0, NULL);
}
APR_BRIGADE_INSERT_TAIL(bsend, foo);
ec = APR_BUCKET_NEXT(ec);
@@ -357,11 +357,11 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(
/* add the final boundary */
end = apr_pstrcat(r->pool, CRLF "--", r->boundary, "--" CRLF, NULL);
ap_xlate_proto_to_ascii(end, strlen(end));
- e = apr_bucket_create_pool(end, strlen(end), r->pool);
+ e = apr_bucket_pool_create(end, strlen(end), r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
}
- e = apr_bucket_create_eos();
+ e = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bsend, e);
/* we're done with the original content */
@@ -489,7 +489,7 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
* were given a time in the future, we return the current time - the
* Last-Modified can't be in the future.
*/
- now = (mtime < r->request_time) ? r->request_time : apr_now();
+ now = (mtime < r->request_time) ? r->request_time : apr_time_now();
return (mtime > now) ? now : mtime;
}
@@ -515,7 +515,7 @@ AP_DECLARE(int) ap_meets_conditions(request_rec *r)
}
/* XXX: we should define a "time unset" constant */
- mtime = (r->mtime != 0) ? r->mtime : apr_now();
+ mtime = (r->mtime != 0) ? r->mtime : apr_time_now();
/* If an If-Match request-header field was given
* AND the field value is not "*" (meaning match anything)
@@ -863,7 +863,7 @@ apr_status_t ap_dechunk_filter(ap_filter_t *f, apr_bucket_brigade *bb,
}
if (ctx->chunk_size == 0) { /* we just finished the last chunk? */
/* append eos bucket and get out */
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
return APR_SUCCESS;
}
@@ -1002,7 +1002,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode
apr_bucket_destroy(old);
}
if (f->c->remain == 0) {
- apr_bucket *eos = apr_bucket_create_eos();
+ apr_bucket *eos = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(b, eos);
}
@@ -1250,7 +1250,7 @@ static int read_request_line(request_rec *r)
/* this is a hack to make sure that request time is set,
* it's not perfect, but it's better than nothing
*/
- r->request_time = apr_now();
+ r->request_time = apr_time_now();
return 0;
}
}
@@ -1275,7 +1275,7 @@ static int read_request_line(request_rec *r)
ap_bsetflag(conn->client, B_SAFEREAD, 0);
#endif
- r->request_time = apr_now();
+ r->request_time = apr_time_now();
r->the_request = apr_pstrdup(r->pool, l);
r->method = ap_getword_white(r->pool, &ll);
#if 0
@@ -1332,8 +1332,8 @@ static void get_mime_headers(request_rec *r)
int fields_read = 0;
apr_table_t *tmp_headers;
- /* We'll use apr_overlap_tables later to merge these into r->headers_in. */
- tmp_headers = apr_make_table(r->pool, 50);
+ /* We'll use apr_table_overlap later to merge these into r->headers_in. */
+ tmp_headers = apr_table_make(r->pool, 50);
/*
* Read header lines until we get the empty separator line, a read error,
@@ -1388,7 +1388,7 @@ static void get_mime_headers(request_rec *r)
apr_table_addn(tmp_headers, copy, value);
}
- apr_overlap_tables(r->headers_in, tmp_headers, APR_OVERLAP_TABLES_MERGE);
+ apr_table_overlap(r->headers_in, tmp_headers, APR_OVERLAP_TABLES_MERGE);
}
request_rec *ap_read_request(conn_rec *conn)
@@ -1399,7 +1399,7 @@ request_rec *ap_read_request(conn_rec *conn)
int access_status;
core_request_config *req_cfg;
- apr_create_pool(&p, conn->pool);
+ apr_pool_create(&p, conn->pool);
r = apr_pcalloc(p, sizeof(request_rec));
r->pool = p;
r->connection = conn;
@@ -1413,11 +1413,11 @@ request_rec *ap_read_request(conn_rec *conn)
r->allowed_methods = ap_make_method_list(p, 2);
- r->headers_in = apr_make_table(r->pool, 50);
- r->subprocess_env = apr_make_table(r->pool, 50);
- r->headers_out = apr_make_table(r->pool, 12);
- r->err_headers_out = apr_make_table(r->pool, 5);
- r->notes = apr_make_table(r->pool, 5);
+ r->headers_in = apr_table_make(r->pool, 50);
+ r->subprocess_env = apr_table_make(r->pool, 50);
+ r->headers_out = apr_table_make(r->pool, 12);
+ r->err_headers_out = apr_table_make(r->pool, 5);
+ r->notes = apr_table_make(r->pool, 5);
r->request_config = ap_create_request_config(r->pool);
req_cfg = apr_pcalloc(r->pool, sizeof(core_request_config));
@@ -1573,10 +1573,10 @@ void ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r)
rnew->status = HTTP_OK;
rnew->headers_in = r->headers_in;
- rnew->subprocess_env = apr_copy_table(rnew->pool, r->subprocess_env);
- rnew->headers_out = apr_make_table(rnew->pool, 5);
- rnew->err_headers_out = apr_make_table(rnew->pool, 5);
- rnew->notes = apr_make_table(rnew->pool, 5);
+ rnew->subprocess_env = apr_table_copy(rnew->pool, r->subprocess_env);
+ rnew->headers_out = apr_table_make(rnew->pool, 5);
+ rnew->err_headers_out = apr_table_make(rnew->pool, 5);
+ rnew->notes = apr_table_make(rnew->pool, 5);
rnew->expecting_100 = r->expecting_100;
rnew->read_length = r->read_length;
@@ -1591,7 +1591,7 @@ static void end_output_stream(request_rec *r)
apr_bucket *b;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
}
@@ -1921,7 +1921,7 @@ AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts)
ml = (ap_method_list_t *) apr_palloc(p, sizeof(ap_method_list_t));
ml->method_mask = 0;
- ml->method_list = apr_make_array(p, sizeof(char *), nelts);
+ ml->method_list = apr_array_make(p, sizeof(char *), nelts);
return ml;
}
@@ -1939,7 +1939,7 @@ AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
dest->method_mask = src->method_mask;
imethods = (char **) src->method_list->elts;
for (i = 0; i < src->method_list->nelts; ++i) {
- omethods = (char **) apr_push_array(dest->method_list);
+ omethods = (char **) apr_array_push(dest->method_list);
*omethods = apr_pstrdup(dest->method_list->cont, imethods[i]);
}
}
@@ -2030,7 +2030,7 @@ AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method)
}
}
}
- xmethod = (const char **) apr_push_array(l->method_list);
+ xmethod = (const char **) apr_array_push(l->method_list);
*xmethod = method;
}
@@ -2188,7 +2188,7 @@ int ap_send_http_options(request_rec *r)
r->bytes_sent = 0;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_pool(buff, strlen(buff), r->pool);
+ b = apr_bucket_pool_create(buff, strlen(buff), r->pool);
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
@@ -2240,7 +2240,7 @@ static int uniq_field_values(void *d, const char *key, const char *val)
}
}
if (i == values->nelts) { /* if not found */
- *(char **)apr_push_array(values) = start;
+ *(char **)apr_array_push(values) = start;
}
} while (*e != '\0');
@@ -2256,7 +2256,7 @@ static void fixup_vary(request_rec *r)
{
apr_array_header_t *varies;
- varies = apr_make_array(r->pool, 5, sizeof(char *));
+ varies = apr_array_make(r->pool, 5, sizeof(char *));
/* Extract all Vary fields from the headers_out, separate each into
* its comma-separated fieldname values, and then add them to varies
@@ -2504,7 +2504,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, apr_b
* later attempts to set or unset a given fieldname might be bypassed.
*/
if (!apr_is_empty_table(r->err_headers_out))
- r->headers_out = apr_overlay_tables(r->pool, r->err_headers_out,
+ r->headers_out = apr_table_overlay(r->pool, r->err_headers_out,
r->headers_out);
/*
@@ -2633,7 +2633,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, apr_b
r->sent_bodyct = 1; /* Whatever follows is real body stuff... */
b2 = apr_brigade_create(r->pool);
- e = apr_bucket_create_pool(buff_start, strlen(buff_start), r->pool);
+ e = apr_bucket_pool_create(buff_start, strlen(buff_start), r->pool);
APR_BRIGADE_INSERT_HEAD(b2, e);
ap_pass_brigade(f->next, b2);
@@ -2796,9 +2796,9 @@ AP_DECLARE(int) ap_should_client_block(request_rec *r)
tmp = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", status_lines[0],
CRLF CRLF, NULL);
bb = apr_brigade_create(r->pool);
- e = apr_bucket_create_pool(tmp, strlen(tmp), r->pool);
+ e = apr_bucket_pool_create(tmp, strlen(tmp), r->pool);
APR_BRIGADE_INSERT_HEAD(bb, e);
- e = apr_bucket_create_flush();
+ e = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
ap_pass_brigade(r->connection->output_filters, bb);
@@ -2955,7 +2955,7 @@ AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of
apr_status_t rv;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_file(fd, offset, len);
+ b = apr_bucket_file_create(fd, offset, len);
APR_BRIGADE_INSERT_TAIL(bb, b);
rv = ap_pass_brigade(r->output_filters, bb);
@@ -2978,7 +2978,7 @@ AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
apr_bucket *b;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_mmap(mm, offset, length);
+ b = apr_bucket_mmap_create(mm, offset, length);
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
@@ -3006,7 +3006,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(
/* whatever is coming down the pipe (we don't care), we
can simply insert our buffered data at the front and
pass the whole bundle down the chain. */
- apr_bucket *b = apr_bucket_create_heap(ctx->buf, nbyte, 0, NULL);
+ apr_bucket *b = apr_bucket_heap_create(ctx->buf, nbyte, 0, NULL);
APR_BRIGADE_INSERT_HEAD(bb, b);
ctx->buf = NULL;
}
@@ -3020,14 +3020,14 @@ static apr_status_t flush_buffer(request_rec *r, old_write_filter_ctx *ctx,
{
apr_bucket_brigade *bb = apr_brigade_create(r->pool);
apr_size_t nbyte = ctx->cur - ctx->buf;
- apr_bucket *b = apr_bucket_create_heap(ctx->buf, nbyte, 0, NULL);
+ apr_bucket *b = apr_bucket_heap_create(ctx->buf, nbyte, 0, NULL);
APR_BRIGADE_INSERT_TAIL(bb, b);
ctx->buf = NULL;
/* if there is extra data, then send that, too */
if (extra != NULL) {
- b = apr_bucket_create_transient(extra, extra_len);
+ b = apr_bucket_transient_create(extra, extra_len);
APR_BRIGADE_INSERT_TAIL(bb, b);
}
@@ -3062,7 +3062,7 @@ static apr_status_t buffer_output(request_rec *r,
deliver the content through the normal filter chain */
if (strcmp("OLD_WRITE", r->output_filters->frec->name) != 0) {
apr_bucket_brigade *bb = apr_brigade_create(r->pool);
- apr_bucket *b = apr_bucket_create_transient(str, len);
+ apr_bucket *b = apr_bucket_transient_create(str, len);
APR_BRIGADE_INSERT_TAIL(bb, b);
return ap_pass_brigade(r->output_filters, bb);
@@ -3217,7 +3217,7 @@ AP_DECLARE(int) ap_rflush(request_rec *r)
apr_bucket *b;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_flush();
+ b = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS)
return -1;
@@ -3531,7 +3531,7 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error)
*/
r->headers_out = r->err_headers_out;
r->err_headers_out = tmp;
- apr_clear_table(r->err_headers_out);
+ apr_table_clear(r->err_headers_out);
if (ap_is_HTTP_REDIRECT(status) || (status == HTTP_CREATED)) {
if ((location != NULL) && *location) {
diff --git a/modules/http/http_request.c b/modules/http/http_request.c
index 178afb04bd..1a71bc56f4 100644
--- a/modules/http/http_request.c
+++ b/modules/http/http_request.c
@@ -794,7 +794,7 @@ static request_rec *make_sub_request(const request_rec *r)
apr_pool_t *rrp;
request_rec *rr;
- apr_create_pool(&rrp, r->pool);
+ apr_pool_create(&rrp, r->pool);
rr = apr_pcalloc(rrp, sizeof(request_rec));
rr->pool = rrp;
return rr;
@@ -1077,7 +1077,7 @@ AP_DECLARE(int) ap_run_sub_req(request_rec *r)
AP_DECLARE(void) ap_destroy_sub_req(request_rec *r)
{
/* Reclaim the space */
- apr_destroy_pool(r->pool);
+ apr_pool_destroy(r->pool);
}
/*****************************************************************
@@ -1385,7 +1385,7 @@ static void check_pipeline_flush(request_rec *r)
/* ### shouldn't this read from the connection input filters? */
if (!r->connection->keepalive ||
ap_get_brigade(r->input_filters, bb, AP_MODE_PEEK) != APR_SUCCESS) {
- apr_bucket *e = apr_bucket_create_flush();
+ apr_bucket *e = apr_bucket_flush_create();
/* We just send directly to the connection based filters. At
* this point, we know that we have seen all of the data
@@ -1417,7 +1417,7 @@ static apr_table_t *rename_original_env(apr_pool_t *p, apr_table_t *t)
{
apr_array_header_t *env_arr = apr_table_elts(t);
apr_table_entry_t *elts = (apr_table_entry_t *) env_arr->elts;
- apr_table_t *new = apr_make_table(p, env_arr->nalloc);
+ apr_table_t *new = apr_table_make(p, env_arr->nalloc);
int i;
for (i = 0; i < env_arr->nelts; ++i) {
@@ -1478,10 +1478,10 @@ static request_rec *internal_internal_redirect(const char *new_uri,
new->main = r->main;
new->headers_in = r->headers_in;
- new->headers_out = apr_make_table(r->pool, 12);
+ new->headers_out = apr_table_make(r->pool, 12);
new->err_headers_out = r->err_headers_out;
new->subprocess_env = rename_original_env(r->pool, r->subprocess_env);
- new->notes = apr_make_table(r->pool, 5);
+ new->notes = apr_table_make(r->pool, 5);
new->allowed_methods = ap_make_method_list(new->pool, 2);
new->htaccess = r->htaccess;
diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c
index 2a3a8afc9e..2b6cde33e9 100644
--- a/modules/http/mod_mime.c
+++ b/modules/http/mod_mime.c
@@ -138,15 +138,15 @@ static void *create_mime_dir_config(apr_pool_t *p, char *dummy)
mime_dir_config *new =
(mime_dir_config *) apr_palloc(p, sizeof(mime_dir_config));
- new->forced_types = apr_make_table(p, 4);
- new->encoding_types = apr_make_table(p, 4);
- new->charset_types = apr_make_table(p, 4);
- new->language_types = apr_make_table(p, 4);
- new->filter_names = apr_make_table(p, 4);
- new->handlers = apr_make_table(p, 4);
- new->handlers_remove = apr_make_array(p, 4, sizeof(attrib_info));
- new->types_remove = apr_make_array(p, 4, sizeof(attrib_info));
- new->encodings_remove = apr_make_array(p, 4, sizeof(attrib_info));
+ new->forced_types = apr_table_make(p, 4);
+ new->encoding_types = apr_table_make(p, 4);
+ new->charset_types = apr_table_make(p, 4);
+ new->language_types = apr_table_make(p, 4);
+ new->filter_names = apr_table_make(p, 4);
+ new->handlers = apr_table_make(p, 4);
+ new->handlers_remove = apr_array_make(p, 4, sizeof(attrib_info));
+ new->types_remove = apr_array_make(p, 4, sizeof(attrib_info));
+ new->encodings_remove = apr_array_make(p, 4, sizeof(attrib_info));
new->type = NULL;
new->handler = NULL;
@@ -164,17 +164,17 @@ static void *merge_mime_dir_configs(apr_pool_t *p, void *basev, void *addv)
int i;
attrib_info *suffix;
- new->forced_types = apr_overlay_tables(p, add->forced_types,
+ new->forced_types = apr_table_overlay(p, add->forced_types,
base->forced_types);
- new->encoding_types = apr_overlay_tables(p, add->encoding_types,
+ new->encoding_types = apr_table_overlay(p, add->encoding_types,
base->encoding_types);
- new->charset_types = apr_overlay_tables(p, add->charset_types,
+ new->charset_types = apr_table_overlay(p, add->charset_types,
base->charset_types);
- new->language_types = apr_overlay_tables(p, add->language_types,
+ new->language_types = apr_table_overlay(p, add->language_types,
base->language_types);
- new->filter_names = apr_overlay_tables(p, add->filter_names,
+ new->filter_names = apr_table_overlay(p, add->filter_names,
base->filter_names);
- new->handlers = apr_overlay_tables(p, add->handlers,
+ new->handlers = apr_table_overlay(p, add->handlers,
base->handlers);
suffix = (attrib_info *) add->handlers_remove->elts;
@@ -293,7 +293,7 @@ static const char *remove_handler(cmd_parms *cmd, void *m, const char *ext)
if (*ext == '.') {
++ext;
}
- suffix = (attrib_info *) apr_push_array(mcfg->handlers_remove);
+ suffix = (attrib_info *) apr_array_push(mcfg->handlers_remove);
suffix->name = apr_pstrdup(cmd->pool, ext);
return NULL;
}
@@ -310,7 +310,7 @@ static const char *remove_encoding(cmd_parms *cmd, void *m, const char *ext)
if (*ext == '.') {
++ext;
}
- suffix = (attrib_info *) apr_push_array(mcfg->encodings_remove);
+ suffix = (attrib_info *) apr_array_push(mcfg->encodings_remove);
suffix->name = apr_pstrdup(cmd->pool, ext);
return NULL;
}
@@ -327,7 +327,7 @@ static const char *remove_type(cmd_parms *cmd, void *m, const char *ext)
if (*ext == '.') {
++ext;
}
- suffix = (attrib_info *) apr_push_array(mcfg->types_remove);
+ suffix = (attrib_info *) apr_array_push(mcfg->types_remove);
suffix->name = apr_pstrdup(cmd->pool, ext);
return NULL;
}
@@ -407,7 +407,7 @@ static void mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
}
for (x = 0; x < MIME_HASHSIZE; x++)
- hash_buckets[x] = apr_make_table(p, 10);
+ hash_buckets[x] = apr_table_make(p, 10);
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
const char *ll = l, *ct;
@@ -717,8 +717,8 @@ static int find_ct(request_rec *r)
r->content_language = type; /* back compat. only */
if (!r->content_languages)
- r->content_languages = apr_make_array(r->pool, 2, sizeof(char *));
- new = (const char **) apr_push_array(r->content_languages);
+ r->content_languages = apr_array_make(r->pool, 2, sizeof(char *));
+ new = (const char **) apr_array_push(r->content_languages);
*new = type;
found = 1;
}
@@ -806,8 +806,8 @@ static int find_ct(request_rec *r)
r->content_language = conf->default_language; /* back compat. only */
if (!r->content_languages)
- r->content_languages = apr_make_array(r->pool, 2, sizeof(char *));
- new = (const char **) apr_push_array(r->content_languages);
+ r->content_languages = apr_array_make(r->pool, 2, sizeof(char *));
+ new = (const char **) apr_array_push(r->content_languages);
*new = conf->default_language;
}