mod_disk_cache.c revision 4c25fdfa5f370d29e55aea846eb9fe6c1d51ede3
181e56d8b348d301d615ccf5465ae600fee2867berikabele/* Licensed to the Apache Software Foundation (ASF) under one or more
181e56d8b348d301d615ccf5465ae600fee2867berikabele * contributor license agreements. See the NOTICE file distributed with
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * this work for additional information regarding copyright ownership.
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * The ASF licenses this file to You under the Apache License, Version 2.0
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd * (the "License"); you may not use this file except in compliance with
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive * the License. You may obtain a copy of the License at
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc * Unless required by applicable law or agreed to in writing, software
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim * distributed under the License is distributed on an "AS IS" BASIS,
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen * See the License for the specific language governing permissions and
2e545ce2450a9953665f701bb05350f0d3f26275nd * limitations under the License.
ee649f9236fe7fcf255bbfa11f2cce080f996521sf * mod_disk_cache: Disk Based HTTP 1.1 Cache.
1ac39787115a288f5e848344b1b1e8dccb1c58f1nd * Flow to Find the .data file:
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung * Incoming client requests URI /foo/bar/baz
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd * Generate <hash> off of /foo/bar/baz
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd * Open <hash>.header
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * Read in <hash>.header file (may contain Format #1 or Format #2)
c68aa7f213d409d464eaa6b963afb28678548f4frbowen * If format #1 (Contains a list of Vary Headers):
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive * Use each header name (from .header) with our request values (headers_in) to
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * regenerate <hash> using HeaderName+HeaderValue+.../foo/bar/baz
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * re-read in <hash>.header (must be format #2)
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive * read in <hash>.data
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * Format #1:
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * apr_uint32_t format;
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive * apr_time_t expire;
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim * apr_array_t vary_headers (delimited by CRLF)
5a58787efeb02a1c3f06569d019ad81fd2efa06end * Format #2:
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim * disk_cache_info_t (first sizeof(apr_uint32_t) bytes is the format)
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen * entity name (dobj->name) [length is in disk_cache_info_t->name_len]
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim * r->headers_out (delimited by CRLF)
5a58787efeb02a1c3f06569d019ad81fd2efa06end * r->headers_in (delimited by CRLF)
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim/* Forward declarations */
5a58787efeb02a1c3f06569d019ad81fd2efa06endstatic apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info *i);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_brigade *b);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t recall_headers(cache_handle_t *h, request_rec *r);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t recall_body(cache_handle_t *h, apr_pool_t *p, apr_bucket_brigade *bb);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
2684d5de7d8996ac96df3a37e8f8a49c502f26dfjsl * Local static functions
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic char *header_file(apr_pool_t *p, disk_cache_conf *conf,
181e56d8b348d301d615ccf5465ae600fee2867berikabele dobj->hashfile = ap_cache_generate_name(p, conf->dirlevels,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX, "/",
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen return apr_pstrcat(p, conf->cache_root, "/", dobj->hashfile,
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slivestatic char *data_file(apr_pool_t *p, disk_cache_conf *conf,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen dobj->hashfile = ap_cache_generate_name(p, conf->dirlevels,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX, "/",
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen return apr_pstrcat(p, conf->cache_root, "/", dobj->hashfile,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t mkdir_structure(disk_cache_conf *conf, const char *file, apr_pool_t *pool)
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen if (rv != APR_SUCCESS && !APR_STATUS_IS_EEXIST(rv)) {
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen/* htcacheclean may remove directories underneath us.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * So, we'll try renaming three times at a cost of 0.002 seconds.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t safe_file_rename(disk_cache_conf *conf,
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive /* 1000 micro-seconds aka 0.001 seconds. */
b9f7b2acbe4a228c3eaeb6293554ca9488330c83rbowenstatic apr_status_t file_cache_el_final(disk_cache_object_t *dobj,
b9f7b2acbe4a228c3eaeb6293554ca9488330c83rbowen /* move the data over */
181e56d8b348d301d615ccf5465ae600fee2867berikabele /* This assumes that the tempfile is on the same file system
181e56d8b348d301d615ccf5465ae600fee2867berikabele * as the cache_root. If not, then we need a file copy/move
181e56d8b348d301d615ccf5465ae600fee2867berikabele * rather than a rename.
181e56d8b348d301d615ccf5465ae600fee2867berikabele rv = apr_file_rename(dobj->tempfile, dobj->datafile, r->pool);
181e56d8b348d301d615ccf5465ae600fee2867berikabele ap_log_error(APLOG_MARK, APLOG_WARNING, rv, r->server,
181e56d8b348d301d615ccf5465ae600fee2867berikabele "disk_cache: rename tempfile to datafile failed:"
181e56d8b348d301d615ccf5465ae600fee2867berikabelestatic apr_status_t file_cache_errorcleanup(disk_cache_object_t *dobj, request_rec *r)
181e56d8b348d301d615ccf5465ae600fee2867berikabele /* Remove the header file and the body file. */
181e56d8b348d301d615ccf5465ae600fee2867berikabele /* If we opened the temporary data file, close and remove it. */
2684d5de7d8996ac96df3a37e8f8a49c502f26dfjsl/* These two functions get and put state information into the data
2684d5de7d8996ac96df3a37e8f8a49c502f26dfjsl * file for an ap_cache_el, this state information will be read
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * and written transparent to clients of this module
2684d5de7d8996ac96df3a37e8f8a49c502f26dfjslstatic int file_cache_recall_mydata(apr_file_t *fd, cache_info *info,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* read the data from the cache file */
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive /* Store it away so we can get it later. */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Note that we could optimize this by conditionally doing the palloc
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * depending upon the size. */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen urlbuff = apr_palloc(r->pool, disk_info.name_len + 1);
25bc0cc439abc002c56f746a04ae3d6ed15fbd7ehumbedooh /* check that we have the same URL */
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive /* Would strncmp be correct? */
7add1372edb1ee95a2c4d1314df4c7567bda7c62jimstatic const char* regen_key(apr_pool_t *p, apr_table_t *headers,
5a58787efeb02a1c3f06569d019ad81fd2efa06end const char *header;
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive const char **elts;
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * - Handle multiple-value headers better. (sort them?)
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive * - Handle Case in-sensitive Values better.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * This isn't the end of the world, since it just lowers the cache
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * hit rate, but it would be nice to fix.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * The majority are case insenstive if they are values (encoding etc).
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen * Most of rfc2616 is case insensitive on header contents.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * So the better solution may be to identify headers which should be
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen * treated case-sensitive?
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * HTTP URI's (3.2.3) [host and scheme are insensitive]
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen * HTTP method (5.1.1)
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * HTTP-date values (3.3.1)
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * 3.7 Media Types [exerpt]
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * The type, subtype, and parameter attribute names are case-
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * insensitive. Parameter values might or might not be case-sensitive,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * depending on the semantics of the parameter name.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * 4.20 Except [exerpt]
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * Comparison of expectation values is case-insensitive for unquoted
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * tokens (including the 100-continue token), and is case-sensitive for
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen * quoted-string expectation-extensions.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic int array_alphasort(const void *fn1, const void *fn2)
f92d094f13138be62bcc1a4b8187d72705d2cb05jslstatic void tokens_to_array(apr_pool_t *p, const char *data,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen while ((token = ap_get_list_item(p, &data)) != NULL) {
f92d094f13138be62bcc1a4b8187d72705d2cb05jsl /* Sort it so that "Vary: A, B" and "Vary: B, A" are stored the same. */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen sizeof(char *), array_alphasort);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * Hook and mod_cache callback functions
f92d094f13138be62bcc1a4b8187d72705d2cb05jslstatic int create_entity(cache_handle_t *h, request_rec *r, const char *key, apr_off_t len)
f92d094f13138be62bcc1a4b8187d72705d2cb05jsl disk_cache_conf *conf = ap_get_module_config(r->server->module_config,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Note, len is -1 if unknown so don't trust it too hard */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen "disk_cache: URL %s failed the size check "
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen "disk_cache: URL %s failed the size check "
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Allocate and initialize cache_object_t and disk_cache_object_t */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen h->cache_obj = obj = apr_pcalloc(r->pool, sizeof(*obj));
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Save the cache root */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen dobj->root = apr_pstrndup(r->pool, conf->cache_root, conf->cache_root_len);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen dobj->datafile = data_file(r->pool, conf, dobj, key);
f92d094f13138be62bcc1a4b8187d72705d2cb05jsl dobj->tempfile = apr_pstrcat(r->pool, conf->cache_root, AP_TEMPFILE, NULL);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic int open_entity(cache_handle_t *h, request_rec *r, const char *key)
f92d094f13138be62bcc1a4b8187d72705d2cb05jsl const char *nkey;
f92d094f13138be62bcc1a4b8187d72705d2cb05jsl static int error_logged = 0;
f92d094f13138be62bcc1a4b8187d72705d2cb05jsl disk_cache_conf *conf = ap_get_module_config(r->server->module_config,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen core_dir_config *coreconf = ap_get_module_config(r->per_dir_config,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Look up entity keyed to 'url' */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen "disk_cache: Cannot cache files to disk without a CacheRoot specified.");
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Create and init the cache object */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen h->cache_obj = obj = apr_pcalloc(r->pool, sizeof(cache_object_t));
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen obj->vobj = dobj = apr_pcalloc(r->pool, sizeof(disk_cache_object_t));
70fce89e67f707c03f70d437a64e189a205ffc35jsl /* Open the headers file */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Save the cache root */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen dobj->root = apr_pstrndup(r->pool, conf->cache_root, conf->cache_root_len);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen rc = apr_file_open(&dobj->hfd, dobj->hdrsfile, flags, 0, r->pool);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* read the format from the cache file */
181e56d8b348d301d615ccf5465ae600fee2867berikabele varray = apr_array_make(r->pool, 5, sizeof(char*));
70fce89e67f707c03f70d437a64e189a205ffc35jsl "disk_cache: Cannot parse vary header file: %s",
e2108029921973b4522af1fe5ecd634a2a55ae07slive nkey = regen_key(r->pool, r->headers_in, varray, key);
181e56d8b348d301d615ccf5465ae600fee2867berikabele dobj->hdrsfile = header_file(r->pool, conf, dobj, nkey);
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive rc = apr_file_open(&dobj->hfd, dobj->hdrsfile, flags, 0, r->pool);
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive "disk_cache: File '%s' has a version mismatch. File had version: %d.",
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen /* This wasn't a Vary Format file, so we must seek to the
70fce89e67f707c03f70d437a64e189a205ffc35jsl * start of the file again, so that later reads work.
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive dobj->datafile = data_file(r->pool, conf, dobj, nkey);
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen dobj->tempfile = apr_pstrcat(r->pool, conf->cache_root, AP_TEMPFILE, NULL);
103f414dc9a63f76c48bc1d81162ea6f3c5ef495slive /* Open the data file */
70fce89e67f707c03f70d437a64e189a205ffc35jsl /* When we are in the quick handler we don't have the per-directory
70fce89e67f707c03f70d437a64e189a205ffc35jsl * configuration, so this check only takes the globel setting of
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive * the EnableSendFile directive into account.
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen flags |= ((coreconf->enable_sendfile == ENABLE_SENDFILE_OFF)
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim rc = apr_file_open(&dobj->fd, dobj->datafile, flags, 0, r->pool);
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim "disk_cache: Cannot open info header file %s", dobj->datafile);
103f414dc9a63f76c48bc1d81162ea6f3c5ef495slive rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, dobj->fd);
2df40fa998d3364133c4dd29eb395f5ae70dfc1fslive /* Read the bytes to setup the cache_info fields */
70fce89e67f707c03f70d437a64e189a205ffc35jsl rc = file_cache_recall_mydata(dobj->hfd, info, dobj, r);
70fce89e67f707c03f70d437a64e189a205ffc35jsl "disk_cache: Cannot read header file %s", dobj->hdrsfile);
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen /* Initialize the cache_handle callback functions */
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive "disk_cache: Recalled cached URL info header %s", dobj->name);
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive /* Null out the cache object pointer so next time we start from scratch */
4aa603e6448b99f9371397d439795c91a93637eand /* Get disk cache object from cache handle */
5a58787efeb02a1c3f06569d019ad81fd2efa06end /* Delete headers file */
cfebc848e619d381e71d40b6f489db4aac180ee5rbowen "disk_cache: Deleting %s from cache.", dobj->hdrsfile);
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive if ((rc != APR_SUCCESS) && !APR_STATUS_IS_ENOENT(rc)) {
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive /* Will only result in an output if httpd is started with -e debug.
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive * For reason see log_error_core for the case s == NULL.
70fce89e67f707c03f70d437a64e189a205ffc35jsl "disk_cache: Failed to delete headers file %s from cache.",
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* Delete data file */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen "disk_cache: Deleting %s from cache.", dobj->datafile);
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive if ((rc != APR_SUCCESS) && !APR_STATUS_IS_ENOENT(rc)) {
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive /* Will only result in an output if httpd is started with -e debug.
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive * For reason see log_error_core for the case s == NULL.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen "disk_cache: Failed to delete data file %s from cache.",
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* now delete directories as far as possible up to our cache root */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen str_to_copy = dobj->hdrsfile ? dobj->hdrsfile : dobj->datafile;
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen /* remove filename */
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * now walk our way back to the cache root, delete everything
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * in the way as far as possible
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * Note: due to the way we constructed the file names in
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * header_file and data_file, we are guaranteed that the
181e56d8b348d301d615ccf5465ae600fee2867berikabele * cache_root is suffixed by at least one '/' which will be
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * turned into a terminating null by this loop. Therefore,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen * we won't either delete or go above our cache root.
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen "disk_cache: Deleting directory %s from cache",
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen if (rc != APR_SUCCESS && !APR_STATUS_IS_ENOENT(rc)) {
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen "Premature end of vary array.");
181e56d8b348d301d615ccf5465ae600fee2867berikabele /* If we've finished reading the array, break out of the loop. */
181e56d8b348d301d615ccf5465ae600fee2867berikabele if (w[0] == '\0') {
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen *((const char **) apr_array_push(arr)) = apr_pstrdup(r->pool, w);
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowenstatic apr_status_t store_array(apr_file_t *fd, apr_array_header_t* arr)
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slive const char **elts;
57d0156f7bbd9ea3a72342cf9912aba61d118702rbowen rv = apr_file_writev(fd, (const struct iovec *) &iov, 2,
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim return apr_file_writev(fd, (const struct iovec *) &iov, 1,
dd9f0e560e29dc86fba5f5d4fa5e72cda5cefb16slivestatic apr_status_t read_table(cache_handle_t *handle, request_rec *r,
221e8a19d2201546e7efe590924383c2a7f0fd72slive while (1) {
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd /* ### What about APR_EOF? */
1ac39787115a288f5e848344b1b1e8dccb1c58f1nd "Premature end of cache headers.");
727872d18412fc021f03969b8641810d8896820bhumbedooh /* Delete terminal (CR?)LF */
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh /* Indeed, the host's '\n':
727872d18412fc021f03969b8641810d8896820bhumbedooh '\012' for UNIX; '\015' for MacOS; '\025' for OS/390
0d0ba3a410038e179b695446bb149cce6264e0abnd -- whatever the script generates.
205f749042ed530040a4f0080dbcb47ceae8a374rjung /* If we've finished reading the headers, break out of the loop. */
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen if (w[0] == '\0') {
5a58787efeb02a1c3f06569d019ad81fd2efa06end /* Chances are that we received an ASCII header text instead of
++maybeEBCDIC;
++maybeASCII;
r->filename);
return APR_EGENERAL;
while (*l && apr_isspace(*l)) {
return APR_SUCCESS;
return APR_NOTFOUND;
return APR_SUCCESS;
apr_bucket *e;
return APR_SUCCESS;
&amt);
return rv;
&amt);
return rv;
if (r->headers_out) {
const char *tmp;
if (tmp) {
r->pool);
return rv;
r->pool);
return rv;
return rv;
return rv;
if (r->headers_out) {
return rv;
if (r->headers_in) {
return rv;
return rv;
return APR_SUCCESS;
apr_bucket *e;
return rv;
e = APR_BUCKET_NEXT(e))
const char *str;
return rv;
return rv;
return APR_EGENERAL;
return APR_EGENERAL;
return APR_EGENERAL;
if (cl_header > 0) {
return APR_EGENERAL;
return APR_SUCCESS;
return conf;
return NULL;
return NULL;
return NULL;
return "CacheMinFileSize argument must be a non-negative integer representing the min size of a file to cache in bytes.";
return NULL;
return "CacheMaxFileSize argument must be a non-negative integer representing the max size of a file to cache in bytes.";
return NULL;
{NULL}