github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_4_58/include/http_request.h (about) 1 /* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to You under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * @file http_request.h 19 * @brief Apache Request library 20 * 21 * @defgroup APACHE_CORE_REQ Apache Request Processing 22 * @ingroup APACHE_CORE 23 * @{ 24 */ 25 26 /* 27 * request.c is the code which handles the main line of request 28 * processing, once a request has been read in (finding the right per- 29 * directory configuration, building it if necessary, and calling all 30 * the module dispatch functions in the right order). 31 * 32 * The pieces here which are public to the modules, allow them to learn 33 * how the server would handle some other file or URI, or perhaps even 34 * direct the server to serve that other file instead of the one the 35 * client requested directly. 36 * 37 * There are two ways to do that. The first is the sub_request mechanism, 38 * which handles looking up files and URIs as adjuncts to some other 39 * request (e.g., directory entries for multiviews and directory listings); 40 * the lookup functions stop short of actually running the request, but 41 * (e.g., for includes), a module may call for the request to be run 42 * by calling run_sub_req. The space allocated to create sub_reqs can be 43 * reclaimed by calling destroy_sub_req --- be sure to copy anything you care 44 * about which was allocated in its apr_pool_t elsewhere before doing this. 45 */ 46 47 #ifndef APACHE_HTTP_REQUEST_H 48 #define APACHE_HTTP_REQUEST_H 49 50 #include "apr_optional.h" 51 #include "util_filter.h" 52 53 #ifdef __cplusplus 54 extern "C" { 55 #endif 56 57 #define AP_SUBREQ_NO_ARGS 0 58 #define AP_SUBREQ_MERGE_ARGS 1 59 60 /** 61 * An internal handler used by the ap_process_request, all subrequest mechanisms 62 * and the redirect mechanism. 63 * @param r The request, subrequest or internal redirect to pre-process 64 * @return The return code for the request 65 */ 66 AP_DECLARE(int) ap_process_request_internal(request_rec *r); 67 68 /** 69 * Create a subrequest from the given URI. This subrequest can be 70 * inspected to find information about the requested URI 71 * @param new_uri The URI to lookup 72 * @param r The current request 73 * @param next_filter The first filter the sub_request should use. If this is 74 * NULL, it defaults to the first filter for the main request 75 * @return The new request record 76 */ 77 AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_uri, 78 const request_rec *r, 79 ap_filter_t *next_filter); 80 81 /** 82 * Create a subrequest for the given file. This subrequest can be 83 * inspected to find information about the requested file 84 * @param new_file The file to lookup 85 * @param r The current request 86 * @param next_filter The first filter the sub_request should use. If this is 87 * NULL, it defaults to the first filter for the main request 88 * @return The new request record 89 */ 90 AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, 91 const request_rec *r, 92 ap_filter_t *next_filter); 93 /** 94 * Create a subrequest for the given apr_dir_read result. This subrequest 95 * can be inspected to find information about the requested file 96 * @param finfo The apr_dir_read result to lookup 97 * @param r The current request 98 * @param subtype What type of subrequest to perform, one of; 99 * <PRE> 100 * AP_SUBREQ_NO_ARGS ignore r->args and r->path_info 101 * AP_SUBREQ_MERGE_ARGS merge r->args and r->path_info 102 * </PRE> 103 * @param next_filter The first filter the sub_request should use. If this is 104 * NULL, it defaults to the first filter for the main request 105 * @return The new request record 106 * @note The apr_dir_read flags value APR_FINFO_MIN|APR_FINFO_NAME flag is the 107 * minimum recommended query if the results will be passed to apr_dir_read. 108 * The file info passed must include the name, and must have the same relative 109 * directory as the current request. 110 */ 111 AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(const apr_finfo_t *finfo, 112 const request_rec *r, 113 int subtype, 114 ap_filter_t *next_filter); 115 /** 116 * Create a subrequest for the given URI using a specific method. This 117 * subrequest can be inspected to find information about the requested URI 118 * @param method The method to use in the new subrequest 119 * @param new_uri The URI to lookup 120 * @param r The current request 121 * @param next_filter The first filter the sub_request should use. If this is 122 * NULL, it defaults to the first filter for the main request 123 * @return The new request record 124 */ 125 AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method, 126 const char *new_uri, 127 const request_rec *r, 128 ap_filter_t *next_filter); 129 /** 130 * An output filter to strip EOS buckets from sub-requests. This always 131 * has to be inserted at the end of a sub-requests filter stack. 132 * @param f The current filter 133 * @param bb The brigade to filter 134 * @return status code 135 */ 136 AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f, 137 apr_bucket_brigade *bb); 138 139 /** 140 * Run the handler for the subrequest 141 * @param r The subrequest to run 142 * @return The return code for the subrequest 143 */ 144 AP_DECLARE(int) ap_run_sub_req(request_rec *r); 145 146 /** 147 * Free the memory associated with a subrequest 148 * @param r The subrequest to finish 149 */ 150 AP_DECLARE(void) ap_destroy_sub_req(request_rec *r); 151 152 /* 153 * Then there's the case that you want some other request to be served 154 * as the top-level request INSTEAD of what the client requested directly. 155 * If so, call this from a handler, and then immediately return OK. 156 */ 157 158 /** 159 * Redirect the current request to some other uri 160 * @param new_uri The URI to replace the current request with 161 * @param r The current request 162 */ 163 AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r); 164 165 /** 166 * This function is designed for things like actions or CGI scripts, when 167 * using AddHandler, and you want to preserve the content type across 168 * an internal redirect. 169 * @param new_uri The URI to replace the current request with. 170 * @param r The current request 171 */ 172 AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *r); 173 174 /** 175 * Redirect the current request to a sub_req, merging the pools 176 * @param sub_req A subrequest created from this request 177 * @param r The current request 178 * @note the sub_req's pool will be merged into r's pool, be very careful 179 * not to destroy this subrequest, it will be destroyed with the main request! 180 */ 181 AP_DECLARE(void) ap_internal_fast_redirect(request_rec *sub_req, request_rec *r); 182 183 /** 184 * Can be used within any handler to determine if any authentication 185 * is required for the current request 186 * @param r The current request 187 * @return 1 if authentication is required, 0 otherwise 188 * @bug Behavior changed in 2.4.x refactoring, API no longer usable 189 * @deprecated @see ap_some_authn_required() 190 */ 191 AP_DECLARE(int) ap_some_auth_required(request_rec *r); 192 193 /** 194 * @defgroup APACHE_CORE_REQ_AUTH Access Control for Sub-Requests and 195 * Internal Redirects 196 * @ingroup APACHE_CORE_REQ 197 * @{ 198 */ 199 200 #define AP_AUTH_INTERNAL_PER_URI 0 /**< Run access control hooks on all 201 internal requests with URIs 202 distinct from that of initial 203 request */ 204 #define AP_AUTH_INTERNAL_PER_CONF 1 /**< Run access control hooks only on 205 internal requests with 206 configurations distinct from 207 that of initial request */ 208 #define AP_AUTH_INTERNAL_MASK 0x000F /**< mask to extract internal request 209 processing mode */ 210 211 /** 212 * Clear flag which determines when access control hooks will be run for 213 * internal requests. 214 */ 215 AP_DECLARE(void) ap_clear_auth_internal(void); 216 217 /** 218 * Determine whether access control hooks will be run for all internal 219 * requests with URIs distinct from that of the initial request, or only 220 * those for which different configurations apply than those which applied 221 * to the initial request. To accommodate legacy external modules which 222 * may expect access control hooks to be run for all internal requests 223 * with distinct URIs, this is the default behaviour unless all access 224 * control hooks and authentication and authorization providers are 225 * registered with AP_AUTH_INTERNAL_PER_CONF. 226 * @param ptemp Pool used for temporary allocations 227 */ 228 AP_DECLARE(void) ap_setup_auth_internal(apr_pool_t *ptemp); 229 230 /** 231 * Register an authentication or authorization provider with the global 232 * provider pool. 233 * @param pool The pool to create any storage from 234 * @param provider_group The group to store the provider in 235 * @param provider_name The name for this provider 236 * @param provider_version The version for this provider 237 * @param provider Opaque structure for this provider 238 * @param type Internal request processing mode, either 239 * AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF 240 * @return APR_SUCCESS if all went well 241 */ 242 AP_DECLARE(apr_status_t) ap_register_auth_provider(apr_pool_t *pool, 243 const char *provider_group, 244 const char *provider_name, 245 const char *provider_version, 246 const void *provider, 247 int type); 248 249 /** @} */ 250 251 /* Optional functions coming from mod_authn_core and mod_authz_core 252 * that list all registered authn/z providers. 253 */ 254 APR_DECLARE_OPTIONAL_FN(apr_array_header_t *, authn_ap_list_provider_names, 255 (apr_pool_t *ptemp)); 256 APR_DECLARE_OPTIONAL_FN(apr_array_header_t *, authz_ap_list_provider_names, 257 (apr_pool_t *ptemp)); 258 259 /** 260 * Determine if the current request is the main request or a subrequest 261 * @param r The current request 262 * @return 1 if this is the main request, 0 otherwise 263 */ 264 AP_DECLARE(int) ap_is_initial_req(request_rec *r); 265 266 /** 267 * Function to set the r->mtime field to the specified value if it's later 268 * than what's already there. 269 * @param r The current request 270 * @param dependency_mtime Time to set the mtime to 271 */ 272 AP_DECLARE(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime); 273 274 /** 275 * Add one or more methods to the list permitted to access the resource. 276 * Usually executed by the content handler before the response header is 277 * sent, but sometimes invoked at an earlier phase if a module knows it 278 * can set the list authoritatively. Note that the methods are ADDED 279 * to any already permitted unless the reset flag is non-zero. The 280 * list is used to generate the Allow response header field when it 281 * is needed. 282 * @param r The pointer to the request identifying the resource. 283 * @param reset Boolean flag indicating whether this list should 284 * completely replace any current settings. 285 * @param ... A NULL-terminated list of strings, each identifying a 286 * method name to add. 287 * @return None. 288 */ 289 AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...) 290 AP_FN_ATTR_SENTINEL; 291 292 /** 293 * Add one or more methods to the list permitted to access the resource. 294 * Usually executed by the content handler before the response header is 295 * sent, but sometimes invoked at an earlier phase if a module knows it 296 * can set the list authoritatively. Note that the methods are ADDED 297 * to any already permitted unless the reset flag is non-zero. The 298 * list is used to generate the Allow response header field when it 299 * is needed. 300 * @param r The pointer to the request identifying the resource. 301 * @param reset Boolean flag indicating whether this list should 302 * completely replace any current settings. 303 * @param ... A list of method identifiers, from the "M_" series 304 * defined in httpd.h, terminated with a value of -1 305 * (e.g., "M_GET, M_POST, M_OPTIONS, -1") 306 * @return None. 307 */ 308 AP_DECLARE(void) ap_allow_standard_methods(request_rec *r, int reset, ...); 309 310 #define MERGE_ALLOW 0 311 #define REPLACE_ALLOW 1 312 313 /** 314 * Process a top-level request from a client, and synchronously write 315 * the response to the client 316 * @param r The current request 317 */ 318 AP_DECLARE(void) ap_process_request(request_rec *r); 319 320 /* For post-processing after a handler has finished with a request. 321 * (Commonly used after it was suspended) 322 */ 323 AP_DECLARE(void) ap_process_request_after_handler(request_rec *r); 324 325 /** 326 * Process a top-level request from a client, allowing some or all of 327 * the response to remain buffered in the core output filter for later, 328 * asynchronous write completion 329 * @param r The current request 330 */ 331 void ap_process_async_request(request_rec *r); 332 333 /** 334 * Kill the current request 335 * @param type Why the request is dying 336 * @param r The current request 337 */ 338 AP_DECLARE(void) ap_die(int type, request_rec *r); 339 340 /** 341 * Check whether a connection is still established and has data available, 342 * optionally consuming blank lines ([CR]LF). 343 * @param c The current connection 344 * @param bb The brigade to filter 345 * @param max_blank_lines Max number of blank lines to consume, or zero 346 * to consider them as data (single read). 347 * @return APR_SUCCESS: connection established with data available, 348 * APR_EAGAIN: connection established and empty, 349 * APR_NOTFOUND: too much blank lines, 350 * APR_E*: connection/general error. 351 */ 352 AP_DECLARE(apr_status_t) ap_check_pipeline(conn_rec *c, apr_bucket_brigade *bb, 353 unsigned int max_blank_lines); 354 355 /* Hooks */ 356 357 /** 358 * Gives modules a chance to create their request_config entry when the 359 * request is created. 360 * @param r The current request 361 * @ingroup hooks 362 */ 363 AP_DECLARE_HOOK(int,create_request,(request_rec *r)) 364 365 /** 366 * This hook allow modules an opportunity to translate the URI into an 367 * actual filename, before URL decoding happens. 368 * @param r The current request 369 * @return DECLINED to let other modules handle the pre-translation, 370 * OK if it was handled and no other module should process it, 371 * DONE if no further transformation should happen on the URI, 372 * HTTP_... in case of error. 373 * @ingroup hooks 374 */ 375 AP_DECLARE_HOOK(int,pre_translate_name,(request_rec *r)) 376 377 /** 378 * This hook allow modules an opportunity to translate the URI into an 379 * actual filename. If no modules do anything special, the server's default 380 * rules will be followed. 381 * @param r The current request 382 * @return OK, DECLINED, or HTTP_... 383 * @ingroup hooks 384 */ 385 AP_DECLARE_HOOK(int,translate_name,(request_rec *r)) 386 387 /** 388 * This hook allow modules to set the per_dir_config based on their own 389 * context (such as "<Proxy>" sections) and responds to contextless requests 390 * such as TRACE that need no security or filesystem mapping. 391 * based on the filesystem. 392 * @param r The current request 393 * @return DONE (or HTTP_) if this contextless request was just fulfilled 394 * (such as TRACE), OK if this is not a file, and DECLINED if this is a file. 395 * The core map_to_storage (HOOK_RUN_REALLY_LAST) will directory_walk 396 * and file_walk the r->filename. 397 * 398 * @ingroup hooks 399 */ 400 AP_DECLARE_HOOK(int,map_to_storage,(request_rec *r)) 401 402 /** 403 * This hook is used to analyze the request headers, authenticate the user, 404 * and set the user information in the request record (r->user and 405 * r->ap_auth_type). This hook is only run when Apache determines that 406 * authentication/authorization is required for this resource (as determined 407 * by the 'Require' directive). It runs after the access_checker hook, and 408 * before the auth_checker hook. This hook should be registered with 409 * ap_hook_check_authn(). 410 * 411 * @param r The current request 412 * @return OK, DECLINED, or HTTP_... 413 * @ingroup hooks 414 * @see ap_hook_check_authn 415 */ 416 AP_DECLARE_HOOK(int,check_user_id,(request_rec *r)) 417 418 /** 419 * Allows modules to perform module-specific fixing of header fields. This 420 * is invoked just before any content-handler 421 * @param r The current request 422 * @return OK, DECLINED, or HTTP_... 423 * @ingroup hooks 424 */ 425 AP_DECLARE_HOOK(int,fixups,(request_rec *r)) 426 427 /** 428 * This routine is called to determine and/or set the various document type 429 * information bits, like Content-type (via r->content_type), language, et 430 * cetera. 431 * @param r the current request 432 * @return OK, DECLINED, or HTTP_... 433 * @ingroup hooks 434 */ 435 AP_DECLARE_HOOK(int,type_checker,(request_rec *r)) 436 437 /** 438 * This hook is used to apply additional access control to this resource. 439 * It runs *before* a user is authenticated, so this hook is really to 440 * apply additional restrictions independent of a user. It also runs 441 * independent of 'Require' directive usage. This hook should be registered 442 * with ap_hook_check_access(). 443 * 444 * @param r the current request 445 * @return OK, DECLINED, or HTTP_... 446 * @ingroup hooks 447 * @see ap_hook_check_access 448 */ 449 AP_DECLARE_HOOK(int,access_checker,(request_rec *r)) 450 451 /** 452 * This hook is used to apply additional access control and/or bypass 453 * authentication for this resource. It runs *before* a user is authenticated, 454 * but after the auth_checker hook. 455 * This hook should be registered with ap_hook_check_access_ex(). 456 * 457 * @param r the current request 458 * @return OK (allow access), DECLINED (let later modules decide), 459 * or HTTP_... (deny access) 460 * @ingroup hooks 461 * @see ap_hook_check_access_ex 462 */ 463 AP_DECLARE_HOOK(int,access_checker_ex,(request_rec *r)) 464 465 /** 466 * This hook is used to check to see if the resource being requested 467 * is available for the authenticated user (r->user and r->ap_auth_type). 468 * It runs after the access_checker and check_user_id hooks. Note that 469 * it will *only* be called if Apache determines that access control has 470 * been applied to this resource (through a 'Require' directive). This 471 * hook should be registered with ap_hook_check_authz(). 472 * 473 * @param r the current request 474 * @return OK, DECLINED, or HTTP_... 475 * @ingroup hooks 476 * @see ap_hook_check_authz 477 */ 478 AP_DECLARE_HOOK(int,auth_checker,(request_rec *r)) 479 480 /** 481 * Register a hook function that will apply additional access control to 482 * the current request. 483 * @param pf An access_checker hook function 484 * @param aszPre A NULL-terminated array of strings that name modules whose 485 * hooks should precede this one 486 * @param aszSucc A NULL-terminated array of strings that name modules whose 487 * hooks should succeed this one 488 * @param nOrder An integer determining order before honouring aszPre and 489 * aszSucc (for example, HOOK_MIDDLE) 490 * @param type Internal request processing mode, either 491 * AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF 492 */ 493 AP_DECLARE(void) ap_hook_check_access(ap_HOOK_access_checker_t *pf, 494 const char * const *aszPre, 495 const char * const *aszSucc, 496 int nOrder, int type); 497 498 /** 499 * Register a hook function that will apply additional access control 500 * and/or bypass authentication for the current request. 501 * @param pf An access_checker_ex hook function 502 * @param aszPre A NULL-terminated array of strings that name modules whose 503 * hooks should precede this one 504 * @param aszSucc A NULL-terminated array of strings that name modules whose 505 * hooks should succeed this one 506 * @param nOrder An integer determining order before honouring aszPre and 507 * aszSucc (for example, HOOK_MIDDLE) 508 * @param type Internal request processing mode, either 509 * AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF 510 */ 511 AP_DECLARE(void) ap_hook_check_access_ex(ap_HOOK_access_checker_ex_t *pf, 512 const char * const *aszPre, 513 const char * const *aszSucc, 514 int nOrder, int type); 515 516 517 /** 518 * Register a hook function that will analyze the request headers, 519 * authenticate the user, and set the user information in the request record. 520 * @param pf A check_user_id hook function 521 * @param aszPre A NULL-terminated array of strings that name modules whose 522 * hooks should precede this one 523 * @param aszSucc A NULL-terminated array of strings that name modules whose 524 * hooks should succeed this one 525 * @param nOrder An integer determining order before honouring aszPre and 526 * aszSucc (for example, HOOK_MIDDLE) 527 * @param type Internal request processing mode, either 528 * AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF 529 */ 530 AP_DECLARE(void) ap_hook_check_authn(ap_HOOK_check_user_id_t *pf, 531 const char * const *aszPre, 532 const char * const *aszSucc, 533 int nOrder, int type); 534 535 /** 536 * Register a hook function that determine if the resource being requested 537 * is available for the currently authenticated user. 538 * @param pf An auth_checker hook function 539 * @param aszPre A NULL-terminated array of strings that name modules whose 540 * hooks should precede this one 541 * @param aszSucc A NULL-terminated array of strings that name modules whose 542 * hooks should succeed this one 543 * @param nOrder An integer determining order before honouring aszPre and 544 * aszSucc (for example, HOOK_MIDDLE) 545 * @param type Internal request processing mode, either 546 * AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF 547 */ 548 AP_DECLARE(void) ap_hook_check_authz(ap_HOOK_auth_checker_t *pf, 549 const char * const *aszPre, 550 const char * const *aszSucc, 551 int nOrder, int type); 552 553 /** 554 * This hook allows modules to insert filters for the current request 555 * @param r the current request 556 * @ingroup hooks 557 */ 558 AP_DECLARE_HOOK(void,insert_filter,(request_rec *r)) 559 560 /** 561 * This hook allows modules to affect the request immediately after the 562 * per-directory configuration for the request has been generated. 563 * @param r The current request 564 * @return OK (allow access), DECLINED (let later modules decide), 565 * or HTTP_... (deny access) 566 * @ingroup hooks 567 */ 568 AP_DECLARE_HOOK(int,post_perdir_config,(request_rec *r)) 569 570 /** 571 * This hook allows a module to force authn to be required when 572 * processing a request. 573 * This hook should be registered with ap_hook_force_authn(). 574 * @param r The current request 575 * @return OK (force authn), DECLINED (let later modules decide) 576 * @ingroup hooks 577 */ 578 AP_DECLARE_HOOK(int,force_authn,(request_rec *r)) 579 580 /** 581 * This hook allows modules to handle/emulate the apr_stat() calls 582 * needed for directory walk. 583 * @param finfo where to put the stat data 584 * @param r The current request 585 * @param wanted APR_FINFO_* flags to pass to apr_stat() 586 * @return apr_status_t or AP_DECLINED (let later modules decide) 587 * @ingroup hooks 588 */ 589 AP_DECLARE_HOOK(apr_status_t,dirwalk_stat,(apr_finfo_t *finfo, request_rec *r, apr_int32_t wanted)) 590 591 AP_DECLARE(int) ap_location_walk(request_rec *r); 592 AP_DECLARE(int) ap_directory_walk(request_rec *r); 593 AP_DECLARE(int) ap_file_walk(request_rec *r); 594 AP_DECLARE(int) ap_if_walk(request_rec *r); 595 596 /** End Of REQUEST (EOR) bucket */ 597 AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eor; 598 599 /** 600 * Determine if a bucket is an End Of REQUEST (EOR) bucket 601 * @param e The bucket to inspect 602 * @return true or false 603 */ 604 #define AP_BUCKET_IS_EOR(e) ((e)->type == &ap_bucket_type_eor) 605 606 /** 607 * Make the bucket passed in an End Of REQUEST (EOR) bucket 608 * @param b The bucket to make into an EOR bucket 609 * @param r The request to destroy when this bucket is destroyed 610 * @return The new bucket, or NULL if allocation failed 611 */ 612 AP_DECLARE(apr_bucket *) ap_bucket_eor_make(apr_bucket *b, request_rec *r); 613 614 /** 615 * Create a bucket referring to an End Of REQUEST (EOR). This bucket 616 * holds a pointer to the request_rec, so that the request can be 617 * destroyed right after all of the output has been sent to the client. 618 * 619 * @param list The freelist from which this bucket should be allocated 620 * @param r The request to destroy when this bucket is destroyed 621 * @return The new bucket, or NULL if allocation failed 622 */ 623 AP_DECLARE(apr_bucket *) ap_bucket_eor_create(apr_bucket_alloc_t *list, 624 request_rec *r); 625 626 /** 627 * Can be used within any handler to determine if any authentication 628 * is required for the current request. Note that if used with an 629 * access_checker hook, an access_checker_ex hook or an authz provider; the 630 * caller should take steps to avoid a loop since this function is 631 * implemented by calling these hooks. 632 * @param r The current request 633 * @return TRUE if authentication is required, FALSE otherwise 634 */ 635 AP_DECLARE(int) ap_some_authn_required(request_rec *r); 636 637 #ifdef __cplusplus 638 } 639 #endif 640 641 #endif /* !APACHE_HTTP_REQUEST_H */ 642 /** @} */