1 /* ====================================================================
2 * The Apache Software License, Version 1.1
4 * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
19 * 3. The end-user documentation included with the redistribution,
20 * if any, must include the following acknowledgment:
21 * "This product includes software developed by the
22 * Apache Software Foundation (http://www.apache.org/)."
23 * Alternately, this acknowledgment may appear in the software itself,
24 * if and wherever such third-party acknowledgments normally appear.
26 * 4. The names "Apache" and "Apache Software Foundation" must
27 * not be used to endorse or promote products derived from this
28 * software without prior written permission. For written
29 * permission, please contact apache@apache.org.
31 * 5. Products derived from this software may not be called "Apache",
32 * nor may "Apache" appear in their name, without prior written
33 * permission of the Apache Software Foundation.
35 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 * ====================================================================
49 * This software consists of voluntary contributions made by many
50 * individuals on behalf of the Apache Software Foundation. For more
51 * information on the Apache Software Foundation, please see
52 * <http://www.apache.org/>.
54 * Portions of this software are based upon public domain software
55 * originally written at the National Center for Supercomputing Applications,
56 * University of Illinois, Urbana-Champaign.
59 #ifndef APACHE_HTTP_PROTOCOL_H
60 #define APACHE_HTTP_PROTOCOL_H
63 #include "apr_hooks.h"
64 #include "apr_portable.h"
66 #include "apr_buckets.h"
67 #include "util_filter.h"
74 * @package HTTP protocol handling
77 /* This is an optimization. We keep a record of the filter_rec that
78 * stores the old_write filter, so that we can avoid strcmp's later.
80 AP_DECLARE_DATA extern ap_filter_rec_t *ap_old_write_func;
83 * Prototypes for routines which either talk directly back to the user,
84 * or control the ones that eventually do.
88 * Read a request and fill in the fields.
89 * @param c The current connection
90 * @return The new request_rec
92 request_rec *ap_read_request(conn_rec *c);
94 /* Finish up stuff after a request */
97 * Called at completion of sending the response. It sends the terminating
98 * protocol information.
99 * @param r The current request
100 * @deffunc void ap_finalize_request_protocol(request_rec *r)
102 AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r);
105 * Send error back to client.
106 * @param r The current request
107 * @param recursive_error last arg indicates error status in case we get
108 * an error in the process of trying to deal with an ErrorDocument
109 * to handle some other error. In that case, we print the default
110 * report for the first thing that went wrong, and more briefly report
111 * on the problem with the ErrorDocument.
112 * @deffunc void ap_send_error_response(request_rec *r, int recursive_error)
114 AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error);
116 /* Set last modified header line from the lastmod date of the associated file.
117 * Also, set content length.
119 * May return an error status, typically HTTP_NOT_MODIFIED (that when the
120 * permit_cache argument is set to one).
124 * Set the content length for this request
125 * @param r The current request
126 * @param length The new content length
127 * @deffunc void ap_set_content_length(request_rec *r, apr_off_t length)
129 AP_DECLARE(void) ap_set_content_length(request_rec *r, apr_off_t length);
132 * Set the keepalive status for this request
133 * @param r The current request
134 * @return 1 if keepalive can be set, 0 otherwise
135 * @deffunc int ap_set_keepalive(request_rec *r)
137 AP_DECLARE(int) ap_set_keepalive(request_rec *r);
140 * Return the latest rational time from a request/mtime pair. Mtime is
141 * returned unless it's in the future, in which case we return the current time.
142 * @param r The current request
143 * @param mtime The last modified time
144 * @return the latest rational time.
145 * @deffunc apr_time_t ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
147 AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);
150 * Build the content-type that should be sent to the client from the
151 * content-type specified. The following rules are followed:
152 * - if type is NULL, type is set to ap_default_type(r)
153 * - if charset adding is disabled, stop processing and return type.
154 * - then, if there are no parameters on type, add the default charset
156 * @param r The current request
157 * @return The content-type
158 * @deffunc const char *ap_make_content_type(request_rec *r, const char *type);
160 AP_DECLARE(const char *) ap_make_content_type(request_rec *r, const char *type);
163 * Construct an entity tag from the resource information. If it's a real
164 * file, build in some of the file characteristics.
165 * @param r The current request
166 * @param force_weak Force the entity tag to be weak - it could be modified
167 * again in as short an interval.
168 * @return The entity tag
169 * @deffunc char *ap_make_etag(request_rec *r, int force_weak)
171 AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak);
174 * Set the E-tag outgoing header
175 * @param The current request
176 * @deffunc void ap_set_etag(request_rec *r)
178 AP_DECLARE(void) ap_set_etag(request_rec *r);
181 * Set the last modified time for the file being sent
182 * @param r The current request
183 * @deffunc void ap_set_last_modified(request_rec *r)
185 AP_DECLARE(void) ap_set_last_modified(request_rec *r);
188 * Implements condition GET rules for HTTP/1.1 specification. This function
189 * inspects the client headers and determines if the response fulfills
190 * the requirements specified.
191 * @param r The current request
192 * @return 1 if the response fulfills the condition GET rules, 0 otherwise
193 * @deffunc int ap_meets_conditions(request_rec *r)
195 AP_DECLARE(int) ap_meets_conditions(request_rec *r);
197 /* Other ways to send stuff at the client. All of these keep track
198 * of bytes_sent automatically. This indirection is intended to make
199 * it a little more painless to slide things like HTTP-NG packetization
200 * underneath the main body of the code later. In the meantime, it lets
201 * us centralize a bit of accounting (bytes_sent).
203 * These also return the number of bytes written by the call.
204 * They should only be called with a timeout registered, for obvious reaasons.
205 * (Ditto the send_header stuff).
209 * Send an entire file to the client, using sendfile if supported by the
211 * @param fd The file to send.
212 * @param r The current request
213 * @param offset Offset into the file to start sending.
214 * @param length Amount of data to send
215 * @param nbytes Amount of data actually sent
216 * @deffunc apr_status_t ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t length, apr_size_t *nbytes);
218 AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset,
219 apr_size_t length, apr_size_t *nbytes);
223 * Send an MMAP'ed file to the client
224 * @param mm The MMAP'ed file to send
225 * @param r The current request
226 * @param offset The offset into the MMAP to start sending
227 * @param length The amount of data to send
228 * @return The number of bytes sent
229 * @deffunc size_t ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, size_t length)
231 AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
235 /* The index of the first bit field that is used to index into a limit
236 * bitmask. M_INVALID + 1 to METHOD_NUMBER_LAST.
238 #define METHOD_NUMBER_FIRST M_INVALID + 1
240 /* The max method number. Method numbers are used to shift bitmasks,
241 * so this cannot exceed 63, and all bits high is equal to -1, which is a
242 * special flag, so the last bit used has index 62.
244 #define METHOD_NUMBER_LAST 62
247 * Register a new request method, and return the offset that will be
248 * associated with that method.
250 * @param p The pool to create registered method numbers from.
251 * @param methname The name of the new method to register.
252 * @return Ab int value representing an offset into a bitmask.
254 AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname);
257 * Initialize the method_registry and allocate memory for it.
259 * @param p Pool to allocate memory for the registry from.
261 AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p);
264 * This is a convenience macro to ease with checking a mask
265 * against a method name.
267 #define AP_METHOD_CHECK_ALLOWED(mask, methname) \
268 ((mask) & (AP_METHOD_BIT << ap_method_number_of((methname))))
271 * Create a new method list with the specified number of preallocated
272 * slots for extension methods.
274 * @param p Pointer to a pool in which the structure should be
276 * @param nelts Number of preallocated extension slots
277 * @return Pointer to the newly created structure.
278 * @deffunc ap_method_list_t ap_make_method_list(apr_pool_t *p, int nelts)
280 AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts);
281 AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
282 ap_method_list_t *src);
283 AP_DECLARE_NONSTD(void) ap_method_list_do(int (*comp) (void *urec, const char *mname,
286 const ap_method_list_t *ml, ...);
287 AP_DECLARE(void) ap_method_list_vdo(int (*comp) (void *urec, const char *mname,
289 void *rec, const ap_method_list_t *ml,
292 * Search for an HTTP method name in an ap_method_list_t structure, and
293 * return true if found.
295 * @param method String containing the name of the method to check.
296 * @param l Pointer to a method list, such as cmd->methods_limited.
297 * @return 1 if method is in the list, otherwise 0
298 * @deffunc int ap_method_in_list(const char *method, ap_method_list_t *l)
300 AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method);
303 * Add an HTTP method name to an ap_method_list_t structure if it isn't
306 * @param method String containing the name of the method to check.
307 * @param l Pointer to a method list, such as cmd->methods_limited.
309 * @deffunc void ap_method_in_list(ap_method_list_t *l, const char *method)
311 AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
314 * Remove an HTTP method name from an ap_method_list_t structure.
316 * @param l Pointer to a method list, such as cmd->methods_limited.
317 * @param method String containing the name of the method to remove.
319 * @deffunc void ap_method_list_remove(ap_method_list_t *l, const char *method)
321 AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
325 * Reset a method list to be completely empty.
327 * @param l Pointer to a method list, such as cmd->methods_limited.
329 * @deffunc void ap_clear_method_list(ap_method_list_t *l)
331 AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l);
333 /* Hmmm... could macrofy these for now, and maybe forever, though the
334 * definitions of the macros would get a whole lot hairier.
338 * Output one character for this request
339 * @param c the character to output
340 * @param r the current request
341 * @return The number of bytes sent
342 * @deffunc int ap_rputc(int c, request_rec *r)
344 AP_DECLARE(int) ap_rputc(int c, request_rec *r);
347 * Output a string for the current request
348 * @param str The string to output
349 * @param r The current request
350 * @return The number of bytes sent
351 * @deffunc int ap_rputs(const char *str, request_rec *r)
353 AP_DECLARE(int) ap_rputs(const char *str, request_rec *r);
356 * Write a buffer for the current request
357 * @param buf The buffer to write
358 * @param nbyte The number of bytes to send from the buffer
359 * @param r The current request
360 * @return The number of bytes sent
361 * @deffunc int ap_rwrite(const void *buf, int nbyte, request_rec *r)
363 AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
366 * Write an unspecified number of strings to the request
367 * @param r The current request
368 * @param ... The strings to write
369 * @return The number of bytes sent
370 * @deffunc int ap_rvputs(request_rec *r, ...)
372 AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...);
375 * Output data to the client in a printf format
376 * @param r The current request
377 * @param fmt The format string
378 * @param vlist The arguments to use to fill out the format string
379 * @return The number of bytes sent
380 * @deffunc int ap_vrprintf(request_rec *r, const char *fmt, va_list vlist)
382 AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist);
385 * Output data to the client in a printf format
386 * @param r The current request
387 * @param fmt The format string
388 * @param ... The arguments to use to fill out the format string
389 * @return The number of bytes sent
390 * @deffunc int ap_rprintf(request_rec *r, const char *fmt, ...)
392 AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
393 __attribute__((format(printf,2,3)));
395 * Flush all of the data for the current request to the client
396 * @param r The current request
397 * @return The number of bytes sent
398 * @deffunc int ap_rflush(request_rec *r)
400 AP_DECLARE(int) ap_rflush(request_rec *r);
403 * Index used in custom_responses array for a specific error code
404 * (only use outside protocol.c is in getting them configured).
405 * @param status HTTP status code
406 * @return The index of the response
407 * @deffunc int ap_index_of_response(int status)
409 AP_DECLARE(int) ap_index_of_response(int status);
412 * Return the Status-Line for a given status code (excluding the
413 * HTTP-Version field). If an invalid or unknown status code is
414 * passed, "500 Internal Server Error" will be returned.
415 * @param status The HTTP status code
416 * @return The Status-Line
417 * @deffunc const char *ap_get_status_line(int status)
419 AP_DECLARE(const char *) ap_get_status_line(int status);
421 /* Reading a block of data from the client connection (e.g., POST arg) */
424 * Setup the client to allow Apache to read the request body.
425 * @param r The current request
426 * @param read_policy How the server should interpret a chunked
427 * transfer-encoding. One of: <pre>
428 * REQUEST_NO_BODY Send 413 error if message has any body
429 * REQUEST_CHUNKED_ERROR Send 411 error if body without Content-Length
430 * REQUEST_CHUNKED_DECHUNK If chunked, remove the chunks for me.
432 * @return either OK or an error code
433 * @deffunc int ap_setup_cleint_block(request_rec *r, int read_policy)
435 AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy);
438 * Determine if the client has sent any data. This also sends a
439 * 100 Continue resposne to HTTP/1.1 clients, so modules should not be called
440 * until the module is ready to read content.
441 * @warning Never call this function more than once.
442 * @param r The current request
443 * @return 0 if there is no message to read, 1 otherwise
444 * @deffunc int ap_should_client_block(request_rec *r)
446 AP_DECLARE(int) ap_should_client_block(request_rec *r);
449 * Call this in a loop. It will put data into a buffer and return the length
451 * @param r The current request
452 * @param buffer The buffer in which to store the data
453 * @param bufsiz The size of the buffer
454 * @return Number of bytes inserted into the buffer. When done reading, 0
455 * if EOF, or -1 if there was an error
456 * @deffunc long ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz)
458 AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz);
461 * In HTTP/1.1, any method can have a body. However, most GET handlers
462 * wouldn't know what to do with a request body if they received one.
463 * This helper routine tests for and reads any message body in the request,
464 * simply discarding whatever it receives. We need to do this because
465 * failing to read the request body would cause it to be interpreted
466 * as the next request on a persistent connection.
467 * @param r The current request
468 * @return error status if request is malformed, OK otherwise
469 * @deffunc int ap_discard_request_body(request_rec *r)
471 AP_DECLARE(int) ap_discard_request_body(request_rec *r);
475 * Setup the output headers so that the client knows how to authenticate
476 * itself the next time, if an authentication request failed. This function
477 * works for both basic and digest authentication
478 * @param r The current request
479 * @deffunc void ap_note_auth_failure(request_rec *r)
481 AP_DECLARE(void) ap_note_auth_failure(request_rec *r);
484 * Setup the output headers so that the client knows how to authenticate
485 * itself the next time, if an authentication request failed. This function
486 * works only for basic authentication
487 * @param r The current request
488 * @deffunc void ap_note_basic_auth_failure(request_rec *r)
490 AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r);
493 * Setup the output headers so that the client knows how to authenticate
494 * itself the next time, if an authentication request failed. This function
495 * works only for digest authentication
496 * @param r The current request
497 * @deffunc void ap_note_digest_auth_failure(request_rec *r)
499 AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r);
502 * Get the password from the request headers
503 * @param r The current request
504 * @param pw The password as set in the headers
505 * @return 0 (OK) if it set the 'pw' argument (and assured
506 * a correct value in r->connection->user); otherwise it returns
507 * an error code, either HTTP_INTERNAL_SERVER_ERROR if things are
508 * really confused, HTTP_UNAUTHORIZED if no authentication at all
509 * seemed to be in use, or DECLINED if there was authentication but
510 * it wasn't Basic (in which case, the caller should presumably
512 * @deffunc int ap_get_basic_auth_pw(request_rec *r, const char **pw)
514 AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
517 * parse_uri: break apart the uri
518 * @warning Side Effects: <pre>
519 * - sets r->args to rest after '?' (or NULL if no '?')
520 * - sets r->uri to request uri (without r->args part)
521 * - sets r->hostname (if not set already) from request (scheme://host:port)
523 * @param r The current request
524 * @param uri The uri to break apart
525 * @deffunc void ap_parse_uri(request_rec *r, const char *uri)
527 AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
530 * Get the next line of input for the request
531 * @param s The buffer into which to read the line
532 * @param n The size of the buffer
533 * @param r The request
534 * @param fold Whether to merge continuation lines
535 * @return The length of the line, if successful
536 * n, if the line is too big to fit in the buffer
537 * -1 for miscellaneous errors
538 * @deffunc int ap_method_number_of(const char *method)
540 AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
543 * Get the next line of input for the request
545 * Note: on ASCII boxes, ap_rgetline is a macro which simply calls
546 * ap_rgetline_core to get the line of input.
548 * on EBCDIC boxes, ap_rgetline is a wrapper function which
549 * translates ASCII protocol lines to the local EBCDIC code page
550 * after getting the line of input.
552 * @param s Pointer to the pointer to the buffer into which the line
553 * should be read; if *s==NULL, a buffer of the necessary size
554 * to hold the data will be allocated from the request pool
555 * @param n The size of the buffer
556 * @param read The length of the line.
557 * @param r The request
558 * @param fold Whether to merge continuation lines
559 * @return APR_SUCCESS, if successful
560 * APR_ENOSPC, if the line is too big to fit in the buffer
561 * Other errors where appropriate
563 #if APR_CHARSET_EBCDIC
564 AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
566 request_rec *r, int fold);
567 #else /* ASCII box */
568 #define ap_rgetline(s, n, read, r, fold) \
569 ap_rgetline_core((s), (n), (read), (r), (fold))
571 AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
573 request_rec *r, int fold);
575 * Get the method number associated with the given string, assumed to
576 * contain an HTTP method. Returns M_INVALID if not recognized.
577 * @param method A string containing a valid HTTP method
578 * @return The method number
579 * @deffunc int ap_method_number_of(const char *method)
581 AP_DECLARE(int) ap_method_number_of(const char *method);
584 * Get the method name associated with the given internal method
585 * number. Returns NULL if not recognized.
586 * @param methnum An integer value corresponding to an internal method number
587 * @return The name corresponding to the method number
588 * @deffunc const char *ap_method_name_of(int methnum)
590 AP_DECLARE(const char *) ap_method_name_of(int methnum);
595 * post_read_request --- run right after read_request or internal_redirect,
596 * and not run during any subrequests.
599 * This hook allows modules to affect the request immediately after the request
600 * has been read, and before any other phases have been processes. This allows
601 * modules to make decisions based upon the input header fields
602 * @param r The current request
603 * @return OK or DECLINED
604 * @deffunc ap_run_post_read_request(request_rec *r)
606 AP_DECLARE_HOOK(int,post_read_request,(request_rec *r))
609 * This hook allows modules to perform any module-specific logging activities
610 * over and above the normal server things.
611 * @param r The current request
612 * @return OK, DECLINED, or HTTP_...
613 * @deffunc int ap_run_log_transaction(request_rec *r)
615 AP_DECLARE_HOOK(int,log_transaction,(request_rec *r))
618 * This hook allows modules to retrieve the http method from a request. This
619 * allows Apache modules to easily extend the methods that Apache understands
620 * @param r The current request
621 * @return The http method from the request
622 * @deffunc const char *ap_run_http_method(const request_rec *r)
624 AP_DECLARE_HOOK(const char *,http_method,(const request_rec *r))
627 * Return the default port from the current request
628 * @param r The current request
629 * @return The current port
630 * @deffunc apr_port_t ap_run_default_port(const request_rec *r)
632 AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *r))
634 typedef struct ap_bucket_error ap_bucket_error;
637 * A bucket referring to an HTTP error
638 * This bucket can be passed down the filter stack to indicate that an
639 * HTTP error occurred while running a filter. In order for this bucket
640 * to be used successfully, it MUST be sent as the first bucket in the
641 * first brigade to be sent from a given filter.
643 struct ap_bucket_error {
644 /** The error code */
646 /** The error string */
650 AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;
653 * Make the bucket passed in an error bucket
654 * @param b The bucket to make into an error bucket
655 * @param error The HTTP error code to put in the bucket.
656 * @param buf An optional error string to put in the bucket.
657 * @param p A pool to allocate out of.
658 * @return The new bucket, or NULL if allocation failed
659 * @deffunc apr_bucket *ap_bucket_error_make(apr_bucket *b, int error, const char *buf, apr_pool_t *p)
661 AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
662 const char *buf, apr_pool_t *p);
665 * Create a bucket referring to an HTTP error.
666 * @param error The HTTP error code to put in the bucket.
667 * @param buf An optional error string to put in the bucket.
668 * @param p A pool to allocate out of.
669 * @return The new bucket, or NULL if allocation failed
670 * @deffunc apr_bucket *ap_bucket_error_create(int error, const char *buf, apr_pool_t *p)
672 AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error,
673 const char *buf, apr_pool_t *p);
675 AP_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, apr_bucket_brigade *b);
676 AP_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, apr_bucket_brigade *b);
677 AP_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *,
678 apr_bucket_brigade *);
679 AP_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade *b);
682 * Setting up the protocol fields for subsidiary requests...
683 * Also, a wrapup function to keep the internal accounting straight.
685 void ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r);
686 void ap_finalize_sub_req_protocol(request_rec *sub_r);
692 #endif /* !APACHE_HTTP_PROTOCOL_H */