util_filter.c revision 013e8c4167a1557177aaa4cf01cb22b0e3868fad
2818N/A/* ==================================================================== 2818N/A * The Apache Software License, Version 1.1 2818N/A * Copyright (c) 2000 The Apache Software Foundation. All rights 2818N/A * Redistribution and use in source and binary forms, with or without 2818N/A * modification, are permitted provided that the following conditions 2818N/A * 1. Redistributions of source code must retain the above copyright 2818N/A * notice, this list of conditions and the following disclaimer. 2818N/A * 2. Redistributions in binary form must reproduce the above copyright 2818N/A * notice, this list of conditions and the following disclaimer in 2818N/A * the documentation and/or other materials provided with the 2818N/A * 3. The end-user documentation included with the redistribution, 2818N/A * if any, must include the following acknowledgment: 2818N/A * "This product includes software developed by the 5466N/A * Alternately, this acknowledgment may appear in the software itself, 2818N/A * if and wherever such third-party acknowledgments normally appear. 2818N/A * 4. The names "Apache" and "Apache Software Foundation" must 2818N/A * not be used to endorse or promote products derived from this 5227N/A * software without prior written permission. For written 2818N/A * permission, please contact apache@apache.org. 2818N/A * 5. Products derived from this software may not be called "Apache", 2818N/A * nor may "Apache" appear in their name, without prior written 5227N/A * permission of the Apache Software Foundation. 3869N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2818N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2818N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 5227N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 2899N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3817N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3817N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 3817N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 3817N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2818N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2818N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2818N/A * ==================================================================== 2818N/A * This software consists of voluntary contributions made by many 2818N/A * individuals on behalf of the Apache Software Foundation. For more 4976N/A * information on the Apache Software Foundation, please see 2818N/A/* ### make this visible for direct manipulation? 2818N/A/* NOTE: Apache's current design doesn't allow a pool to be passed thu, 2818N/A so we depend on a global to hold the correct pool 2818N/A** This macro returns true/false if a given filter should be inserted BEFORE 2818N/A** another filter. This will happen when one of: 1) there isn't another 2818N/A** filter; 2) that filter has a higher filter type (class); 3) that filter 2818N/A** corresponds to a different request. 3747N/A * Read data from the next filter in the filter stack. Data should be 3747N/A * modified in the bucket brigade that is passed in. The core allocates the 3747N/A * bucket brigade, modules that wish to replace large chunks of data or to 3747N/A * save data off to the side should probably create their own temporary 3747N/A * brigade especially for that use. 3817N/A/* Pass the buckets to the next filter in the filter stack. If the 3817N/A * current filter is a handler, we should get NULL passed in instead of 3817N/A * the current filter. At that point, we can just call the first filter in 3817N/A * the stack, or r->output_filters. /* If have never stored any data in the filter, then we had better * create an empty bucket brigade so that we can concat.