diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2000-09-17 18:52:46 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2000-09-17 18:52:46 +0000 |
commit | c044a0db31edeb04d179a8927b3b50c067513f34 (patch) | |
tree | e498e0ebe379a2a4693d14ed5e8e54f99fef0f2a /buckets/apr_buckets_refcount.c | |
parent | 3f9875cc68b80ab8a2fed724961e6a25eadfaf16 (diff) | |
download | libapr-util-c044a0db31edeb04d179a8927b3b50c067513f34.tar.gz |
If a bucket is split at the first or last character, then we should get
a zero length bucket and a bucket containing the original text. Later
filters will either throw away the zero length bucket, or they will just
ignore it. The problem is that if we return an error in those conditions,
then all filters need special logic whenever they are going to split a
bucket. By always splitting, only a few selected buckets need the special
logic to deal with zero-length buckets. This also fixes mod_include to not
have the special logic around it's split call.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@57876 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'buckets/apr_buckets_refcount.c')
-rw-r--r-- | buckets/apr_buckets_refcount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buckets/apr_buckets_refcount.c b/buckets/apr_buckets_refcount.c index 10e0eec2..9f5f6427 100644 --- a/buckets/apr_buckets_refcount.c +++ b/buckets/apr_buckets_refcount.c @@ -64,7 +64,7 @@ API_EXPORT_NONSTD(apr_status_t) ap_bucket_split_shared(ap_bucket *a, apr_off_t p ap_bucket_shared *ad, *bd; ap_bucket_refcount *r; - if (point <= 0 || point >= a->length) { + if (point < 0 || point > a->length) { return APR_EINVAL; } |