-/* Copyright 1999-2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
/**
* Build the content-type that should be sent to the client from the
* content-type specified. The following rules are followed:
- * - if type is NULL, type is set to ap_default_type(r)
+ * - if type is NULL or "", return NULL (do not set content-type).
* - if charset adding is disabled, stop processing and return type.
* - then, if there are no parameters on type, add the default charset
* - return type
AP_DECLARE(const char *) ap_make_content_type(request_rec *r,
const char *type);
-#ifdef CORE_PRIVATE
/**
* Precompile metadata structures used by ap_make_content_type()
* @param pool The pool to use for allocations
*/
AP_DECLARE(void) ap_setup_make_content_type(apr_pool_t *pool);
-#endif /* CORE_PRIVATE */
/**
* Construct an entity tag from the resource information. If it's a real
* return true if found.
*
* @param method String containing the name of the method to check.
- * @param l Pointer to a method list, such as cmd->methods_limited.
+ * @param l Pointer to a method list, such as r->allowed_methods.
* @return 1 if method is in the list, otherwise 0
*/
AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method);
* already listed.
*
* @param method String containing the name of the method to check.
- * @param l Pointer to a method list, such as cmd->methods_limited.
+ * @param l Pointer to a method list, such as r->allowed_methods.
* @return None.
*/
AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
/**
* Remove an HTTP method name from an ap_method_list_t structure.
*
- * @param l Pointer to a method list, such as cmd->methods_limited.
+ * @param l Pointer to a method list, such as r->allowed_methods.
* @param method String containing the name of the method to remove.
* @return None.
*/
/**
* Reset a method list to be completely empty.
*
- * @param l Pointer to a method list, such as cmd->methods_limited.
+ * @param l Pointer to a method list, such as r->allowed_methods.
* @return None.
*/
AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l);
/**
* Setup the output headers so that the client knows how to authenticate
- * itself the next time, if an authentication request failed. This function
- * works for both basic and digest authentication
+ * itself the next time, if an authentication request failed.
* @param r The current request
*/
AP_DECLARE(void) ap_note_auth_failure(request_rec *r);
/**
- * Setup the output headers so that the client knows how to authenticate
- * itself the next time, if an authentication request failed. This function
- * works only for basic authentication
- * @param r The current request
+ * @deprecated @see ap_note_auth_failure
*/
AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r);
/**
- * Setup the output headers so that the client knows how to authenticate
- * itself the next time, if an authentication request failed. This function
- * works only for digest authentication
- * @param r The current request
+ * @deprecated @see ap_note_auth_failure
*/
AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r);
+/**
+ * This hook allows modules to add support for a specific auth type to
+ * ap_note_auth_failure
+ * @param r the current request
+ * @param auth_type the configured auth_type
+ * @return OK, DECLINED
+ */
+AP_DECLARE_HOOK(int, note_auth_failure, (request_rec *r, const char *auth_type))
+
/**
* Get the password from the request headers
* @param r The current request
* @param sub_r Subrequest that is now compete
*/
AP_DECLARE(void) ap_finalize_sub_req_protocol(request_rec *sub_r);
-
+
+/**
+ * Send an interim (HTTP 1xx) response immediately.
+ * @param r The request
+ * @param send_headers Whether to send&clear headers in r->headers_out
+ */
+AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers);
+
#ifdef __cplusplus
}
#endif