]> granicus.if.org Git - apache/blob - include/http_protocol.h
Forgot this header file when I cleaned the error_bucket code.
[apache] / include / http_protocol.h
1 /* ====================================================================
2  * The Apache Software License, Version 1.1
3  *
4  * Copyright (c) 2000 The Apache Software Foundation.  All rights
5  * reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  *
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
17  *    distribution.
18  *
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.
25  *
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.
30  *
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.
34  *
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
46  * SUCH DAMAGE.
47  * ====================================================================
48  *
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/>.
53  *
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.
57  */
58
59 #ifndef APACHE_HTTP_PROTOCOL_H
60 #define APACHE_HTTP_PROTOCOL_H
61
62 #include "httpd.h"
63 #include "apr_hooks.h"
64 #include "apr_portable.h"
65 #include "apr_mmap.h"
66 #include "apr_buckets.h"
67
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71
72 /**
73  * @package HTTP protocol handling
74  */
75
76 /*
77  * Prototypes for routines which either talk directly back to the user,
78  * or control the ones that eventually do.
79  */
80
81 /**
82  * Read a request and fill in the fields.
83  * @param c The current connection
84  * @return The new request_rec
85  */ 
86 request_rec *ap_read_request(conn_rec *c);
87
88 /**
89  * Send the minimal part of an HTTP response header.
90  * @param r The current request
91  * @param buf The buffer to add the header to.
92  * @warning Modules should be very careful about using this, and should 
93  *          prefer ap_send_http_header().  Much of the HTTP/1.1 implementation 
94  *          correctness depends on code in ap_send_http_header().
95  * @deffunc void ap_basic_http_header(request_rec *r, char *buf)
96  */
97 AP_DECLARE(void) ap_basic_http_header(request_rec *r, char *buf);
98
99 /**
100  * Send the Status-Line and header fields for HTTP response
101  * @param l The current request
102  * @deffunc void ap_send_http_header(request_rec *l)
103  */
104 AP_DECLARE(void) ap_send_http_header(request_rec *l);
105
106 /* Send the response to special method requests */
107
108 AP_DECLARE(int) ap_send_http_trace(request_rec *r);
109 int ap_send_http_options(request_rec *r);
110
111 /* Finish up stuff after a request */
112
113 /**
114  * Called at completion of sending the response.  It sends the terminating
115  * protocol information.
116  * @param r The current request
117  * @deffunc void ap_finalize_request_protocol(request_rec *r)
118  */
119 AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r);
120
121 /**
122  * Send error back to client.
123  * @param r The current request
124  * @param recursive_error last arg indicates error status in case we get 
125  *      an error in the process of trying to deal with an ErrorDocument 
126  *      to handle some other error.  In that case, we print the default 
127  *      report for the first thing that went wrong, and more briefly report 
128  *      on the problem with the ErrorDocument.
129  * @deffunc void ap_send_error_response(request_rec *r, int recursive_error)
130  */
131 AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error);
132
133 /* Set last modified header line from the lastmod date of the associated file.
134  * Also, set content length.
135  *
136  * May return an error status, typically HTTP_NOT_MODIFIED (that when the
137  * permit_cache argument is set to one).
138  */
139
140 /**
141  * Set the content length for this request
142  * @param r The current request
143  * @param length The new content length
144  * @deffunc void ap_set_content_length(request_rec *r, apr_off_t length)
145  */
146 AP_DECLARE(void) ap_set_content_length(request_rec *r, apr_off_t length);
147
148 /**
149  * Set the keepalive status for this request
150  * @param r The current request
151  * @return 1 if keepalive can be set, 0 otherwise
152  * @deffunc int ap_set_keepalive(request_rec *r)
153  */
154 AP_DECLARE(int) ap_set_keepalive(request_rec *r);
155
156 /**
157  * Return the latest rational time from a request/mtime pair.  Mtime is 
158  * returned unless it's in the future, in which case we return the current time.
159  * @param r The current request
160  * @param mtime The last modified time
161  * @return the latest rational time.
162  * @deffunc apr_time_t ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
163  */
164 AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);
165
166 /**
167  * Construct an entity tag from the resource information.  If it's a real
168  * file, build in some of the file characteristics.
169  * @param r The current request
170  * @param force_weak Force the entity tag to be weak - it could be modified
171  *                   again in as short an interval.
172  * @return The entity tag
173  * @deffunc char *ap_make_etag(request_rec *r, int force_weak)
174  */ 
175 AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak);
176
177 /**
178  * Set the E-tag outgoing header
179  * @param The current request
180  * @deffunc void ap_set_etag(request_rec *r)
181  */
182 AP_DECLARE(void) ap_set_etag(request_rec *r);
183
184 /**
185  * Set the last modified time for the file being sent
186  * @param r The current request
187  * @deffunc void ap_set_last_modified(request_rec *r)
188  */
189 AP_DECLARE(void) ap_set_last_modified(request_rec *r);
190
191 /**
192  * Implements condition GET rules for HTTP/1.1 specification.  This function
193  * inspects the client headers and determines if the response fulfills 
194  * the requirements specified.
195  * @param r The current request
196  * @return 1 if the response fulfills the condition GET rules, 0 otherwise
197  * @deffunc int ap_meets_conditions(request_rec *r)
198  */
199 AP_DECLARE(int) ap_meets_conditions(request_rec *r);
200
201 /* Other ways to send stuff at the client.  All of these keep track
202  * of bytes_sent automatically.  This indirection is intended to make
203  * it a little more painless to slide things like HTTP-NG packetization
204  * underneath the main body of the code later.  In the meantime, it lets
205  * us centralize a bit of accounting (bytes_sent).
206  *
207  * These also return the number of bytes written by the call.
208  * They should only be called with a timeout registered, for obvious reaasons.
209  * (Ditto the send_header stuff).
210  */
211
212 /**
213  * Send an entire file to the client, using sendfile if supported by the 
214  * current platform
215  * @param fd The file to send.
216  * @param r The current request
217  * @param offset Offset into the file to start sending.
218  * @param length Amount of data to send
219  * @param nbytes Amount of data actually sent
220  * @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);
221  */
222 AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, 
223                                    apr_size_t length, apr_size_t *nbytes);
224
225 #if APR_HAS_MMAP
226 /**
227  * Send an MMAP'ed file to the client
228  * @param mm The MMAP'ed file to send
229  * @param r The current request
230  * @param offset The offset into the MMAP to start sending
231  * @param length The amount of data to send
232  * @return The number of bytes sent
233  * @deffunc size_t ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, size_t length)
234  */
235 AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
236                              size_t length);
237 #endif
238
239 /**
240  * Create a new method list with the specified number of preallocated
241  * slots for extension methods.
242  *
243  * @param   p       Pointer to a pool in which the structure should be
244  *                  allocated.
245  * @param   nelts   Number of preallocated extension slots
246  * @return  Pointer to the newly created structure.
247  * @deffunc ap_method_list_t ap_make_method_list(apr_pool_t *p, int nelts)
248  */
249 AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts);
250 AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
251                                      ap_method_list_t *src);
252 AP_DECLARE_NONSTD(void) ap_method_list_do(int (*comp) (void *urec, const char *mname,
253                                                        int mnum),
254                                           void *rec,
255                                           const ap_method_list_t *ml, ...);
256 AP_DECLARE(void) ap_method_list_vdo(int (*comp) (void *urec, const char *mname,
257                                                  int mnum),
258                                     void *rec, const ap_method_list_t *ml,
259                                     va_list vp);
260 /**
261  * Search for an HTTP method name in an ap_method_list_t structure, and
262  * return true if found.
263  *
264  * @param   method  String containing the name of the method to check.
265  * @param   l       Pointer to a method list, such as cmd->methods_limited.
266  * @return  1 if method is in the list, otherwise 0
267  * @deffunc int ap_method_in_list(const char *method, ap_method_list_t *l)
268  */
269 AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method);
270
271 /**
272  * Add an HTTP method name to an ap_method_list_t structure if it isn't
273  * already listed.
274  *
275  * @param   method  String containing the name of the method to check.
276  * @param   l       Pointer to a method list, such as cmd->methods_limited.
277  * @return  None.
278  * @deffunc void ap_method_in_list(ap_method_list_t *l, const char *method)
279  */
280 AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
281     
282 /**
283  * Remove an HTTP method name from an ap_method_list_t structure.
284  *
285  * @param   l       Pointer to a method list, such as cmd->methods_limited.
286  * @param   method  String containing the name of the method to remove.
287  * @return  None.
288  * @deffunc void ap_method_list_remove(ap_method_list_t *l, const char *method)
289  */
290 AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
291                                        const char *method);
292
293 /**
294  * Reset a method list to be completely empty.
295  *
296  * @param   l       Pointer to a method list, such as cmd->methods_limited.
297  * @return  None.
298  * @deffunc void ap_clear_method_list(ap_method_list_t *l)
299  */
300 AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l);
301     
302 /* Hmmm... could macrofy these for now, and maybe forever, though the
303  * definitions of the macros would get a whole lot hairier.
304  */
305
306 /**
307  * Output one character for this request
308  * @param c the character to output
309  * @param r the current request
310  * @return The number of bytes sent
311  * @deffunc int ap_rputc(int c, request_rec *r)
312  */
313 AP_DECLARE(int) ap_rputc(int c, request_rec *r);
314 /**
315  * Output a string for the current request
316  * @param str The string to output
317  * @param r The current request
318  * @return The number of bytes sent
319  * @deffunc int ap_rputs(const char *str, request_rec *r)
320  */
321 AP_DECLARE(int) ap_rputs(const char *str, request_rec *r);
322 /**
323  * Write a buffer for the current request
324  * @param buf The buffer to write
325  * @param nbyte The number of bytes to send from the buffer
326  * @param r The current request
327  * @return The number of bytes sent
328  * @deffunc int ap_rwrite(const void *buf, int nbyte, request_rec *r)
329  */
330 AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
331 /**
332  * Write an unspecified number of strings to the request
333  * @param r The current request
334  * @param ... The strings to write
335  * @return The number of bytes sent
336  * @deffunc int ap_rvputs(request_rec *r, ...)
337  */
338 AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...);
339 /**
340  * Output data to the client in a printf format
341  * @param r The current request
342  * @param fmt The format string
343  * @param vlist The arguments to use to fill out the format string
344  * @return The number of bytes sent
345  * @deffunc int ap_vrprintf(request_rec *r, const char *fmt, va_list vlist)
346  */
347 AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist);
348 /**
349  * Output data to the client in a printf format
350  * @param r The current request
351  * @param fmt The format string
352  * @param ... The arguments to use to fill out the format string
353  * @return The number of bytes sent
354  * @deffunc int ap_rprintf(request_rec *r, const char *fmt, ...)
355  */
356 AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
357                                 __attribute__((format(printf,2,3)));
358 /**
359  * Flush all of the data for the current request to the client
360  * @param r The current request
361  * @return The number of bytes sent
362  * @deffunc int ap_rflush(request_rec *r)
363  */
364 AP_DECLARE(int) ap_rflush(request_rec *r);
365
366 /**
367  * Index used in custom_responses array for a specific error code
368  * (only use outside protocol.c is in getting them configured).
369  * @param status HTTP status code
370  * @return The index of the response
371  * @deffunc int ap_index_of_response(int status)
372  */
373 AP_DECLARE(int) ap_index_of_response(int status);
374
375 /** 
376  * Return the Status-Line for a given status code (excluding the
377  * HTTP-Version field). If an invalid or unknown status code is
378  * passed, "500 Internal Server Error" will be returned. 
379  * @param status The HTTP status code
380  * @return The Status-Line
381  * @deffunc const char *ap_get_status_line(int status)
382  */
383 AP_DECLARE(const char *) ap_get_status_line(int status);
384
385 /* Reading a block of data from the client connection (e.g., POST arg) */
386
387 /**
388  * Setup the client to allow Apache to read the request body.
389  * @param r The current request
390  * @param read_policy How the server should interpret a chunked 
391  *                    transfer-encoding.  One of: <PRE>
392  *    REQUEST_NO_BODY          Send 413 error if message has any body
393  *    REQUEST_CHUNKED_ERROR    Send 411 error if body without Content-Length
394  *    REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
395  * </PRE>
396  * @return either OK or an error code
397  * @deffunc int ap_setup_cleint_block(request_rec *r, int read_policy)
398  */
399 AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy);
400 /**
401  * Determine if the client has sent any data.  This also sends a 
402  * 100 Continue resposne to HTTP/1.1 clients, so modules should not be called
403  * until the module is ready to read content.
404  * @warning Never call this function more than once.
405  * @param r The current request
406  * @return 0 if there is no message to read, 1 otherwise
407  * @deffunc int ap_should_client_block(request_rec *r)
408  */
409 AP_DECLARE(int) ap_should_client_block(request_rec *r);
410 /**
411  * Call this in a loop.  It will put data into a buffer and return the length
412  * of the input block
413  * @param r The current request
414  * @param buffer The buffer in which to store the data
415  * @param bufsiz The size of the buffer
416  * @return Number of bytes inserted into the buffer.  When done reading, 0
417  *         if EOF, or -1 if there was an error
418  * @deffunc long ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
419  */
420 AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz);
421 /**
422  * In HTTP/1.1, any method can have a body.  However, most GET handlers
423  * wouldn't know what to do with a request body if they received one.
424  * This helper routine tests for and reads any message body in the request,
425  * simply discarding whatever it receives.  We need to do this because
426  * failing to read the request body would cause it to be interpreted
427  * as the next request on a persistent connection.
428  * @param r The current request
429  * @return error status if request is malformed, OK otherwise 
430  * @deffunc int ap_discard_request_body(request_rec *r)
431  */
432 AP_DECLARE(int) ap_discard_request_body(request_rec *r);
433
434 /* Sending a byterange */
435
436 /**
437  * Setup the output headers so that the client knows how to authenticate
438  * itself the next time, if an authentication request failed.  This function
439  * works for both basic and digest authentication
440  * @param r The current request
441  * @deffunc void ap_note_auth_failure(request_rec *r)
442  */ 
443 AP_DECLARE(void) ap_note_auth_failure(request_rec *r);
444 /**
445  * Setup the output headers so that the client knows how to authenticate
446  * itself the next time, if an authentication request failed.  This function
447  * works only for basic authentication
448  * @param r The current request
449  * @deffunc void ap_note_basic_auth_failure(request_rec *r)
450  */ 
451 AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r);
452 /**
453  * Setup the output headers so that the client knows how to authenticate
454  * itself the next time, if an authentication request failed.  This function
455  * works only for digest authentication
456  * @param r The current request
457  * @deffunc void ap_note_digest_auth_failure(request_rec *r)
458  */ 
459 AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r);
460 /**
461  * Get the password from the request headers
462  * @param r The current request
463  * @param pw The password as set in the headers
464  * @return 0 (OK) if it set the 'pw' argument (and assured
465  *         a correct value in r->connection->user); otherwise it returns 
466  *         an error code, either HTTP_INTERNAL_SERVER_ERROR if things are 
467  *         really confused, HTTP_UNAUTHORIZED if no authentication at all 
468  *         seemed to be in use, or DECLINED if there was authentication but 
469  *         it wasn't Basic (in which case, the caller should presumably 
470  *         decline as well).
471  * @deffunc int ap_get_basic_auth_pw(request_rec *r, const char **pw)
472  */
473 AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
474
475 /*
476  * Setting up the protocol fields for subsidiary requests...
477  * Also, a wrapup function to keep the internal accounting straight.
478  */
479
480 void ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r);
481 void ap_finalize_sub_req_protocol(request_rec *sub_r);
482
483 /**
484  * parse_uri: break apart the uri
485  * @warning Side Effects: <PRE>
486  *    - sets r->args to rest after '?' (or NULL if no '?')
487  *    - sets r->uri to request uri (without r->args part)
488  *    - sets r->hostname (if not set already) from request (scheme://host:port)
489  * </PRE>
490  * @param r The current request
491  * @param uri The uri to break apart
492  * @deffunc void ap_parse_uri(request_rec *r, const char *uri)
493  */
494 AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
495
496 AP_CORE_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
497
498 /**
499  * Get the method number associated with the given string, assumed to
500  * contain an HTTP method.  Returns M_INVALID if not recognized.
501  * @param method A string containing a valid HTTP method
502  * @return The method number
503  * @deffunc int ap_method_number_of(const char *method)
504  */
505 AP_DECLARE(int) ap_method_number_of(const char *method);
506
507 /**
508  * Get the method name associated with the given internal method
509  * number.  Returns NULL if not recognized.
510  * @param methnum An integer value corresponding to an internal method number
511  * @return The name corresponding to the method number
512  * @deffunc const char *ap_method_name_of(int methnum)
513  */
514 AP_DECLARE(const char *) ap_method_name_of(int methnum);
515
516
517   /* Hooks */
518   /*
519    * post_read_request --- run right after read_request or internal_redirect,
520    *                  and not run during any subrequests.
521    */
522 /**
523  * This hook allows modules to affect the request immediately after the request
524  * has been read, and before any other phases have been processes.  This allows
525  * modules to make decisions based upon the input header fields
526  * @param r The current request
527  * @return OK or DECLINED
528  * @deffunc ap_run_post_read_request(request_rec *r)
529  */
530 AP_DECLARE_HOOK(int,post_read_request,(request_rec *))
531 /**
532  * This hook allows modules to perform any module-specific logging activities
533  * over and above the normal server things.
534  * @param r The current request
535  * @return OK, DECLINED, or HTTP_...
536  * @deffunc int ap_run_log_transaction(request_rec *r)
537  */
538 AP_DECLARE_HOOK(int,log_transaction,(request_rec *))
539 /**
540  * This hook allows modules to retrieve the http method from a request.  This
541  * allows Apache modules to easily extend the methods that Apache understands
542  * @param r The current request
543  * @return The http method from the request
544  * @deffunc const char *ap_run_http_method(const request_rec *r)
545  */
546 AP_DECLARE_HOOK(const char *,http_method,(const request_rec *))
547 /**
548  * Return the default port from the current request
549  * @param r The current request
550  * @return The current port
551  * @deffunc apr_port_t ap_run_default_port(const request_rec *r)
552  */
553 AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *))
554
555 typedef struct ap_bucket_error ap_bucket_error;
556 /**
557  * A bucket referring to an HTTP error
558  * This bucket can be passed down the filter stack to indicate that an
559  * HTTP error occurred while running a filter.  In order for this bucket
560  * to be used successfully, it MUST be sent as the first bucket in the
561  * first brigade to be sent from a given filter.
562  */
563 struct ap_bucket_error {
564     /** The error code */
565     int status;
566     /** The error string */
567     const char    *start;
568 };
569
570 AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;
571
572 /**
573  * Make the bucket passed in an error bucket
574  * @param b The bucket to make into an error bucket
575  * @param error The HTTP error code to put in the bucket. 
576  * @param buf An optional error string to put in the bucket.
577  * @param p A pool to allocate out of.
578  * @return The new bucket, or NULL if allocation failed
579  * @deffunc apr_bucket *ap_bucket_make_error(apr_bucket *b, int error, const char *buf, apr_pool_t *p)
580  */
581 AP_DECLARE(apr_bucket *) ap_bucket_make_error(apr_bucket *b, int error,
582                 const char *buf, apr_pool_t *p);
583
584 /**
585  * Create a bucket referring to an HTTP error.
586  * @param error The HTTP error code to put in the bucket. 
587  * @param buf An optional error string to put in the bucket.
588  * @param p A pool to allocate out of.
589  * @return The new bucket, or NULL if allocation failed
590  * @deffunc apr_bucket *ap_bucket_create_error(int error, const char *buf, apr_pool_t *p)
591  */
592 AP_DECLARE(apr_bucket *) ap_bucket_create_error(int error,
593                 const char *buf, apr_pool_t *p);
594
595 #ifdef __cplusplus
596 }
597 #endif
598
599 #endif  /* !APACHE_HTTP_PROTOCOL_H */