]> granicus.if.org Git - apache/blobdiff - include/http_protocol.h
ap_expr related fixes/enhancements:
[apache] / include / http_protocol.h
index 662edcbef17c28f98614df282306270b06ec0ac4..5b71dfd0e66405d436eb61add0f0a3179ce16ad7 100644 (file)
@@ -1,9 +1,9 @@
-/* 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
  *
@@ -129,7 +129,7 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);
 /**
  * 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
@@ -140,13 +140,11 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);
 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
@@ -267,7 +265,7 @@ AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
  * 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);
@@ -277,7 +275,7 @@ 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);
@@ -285,7 +283,7 @@ 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.
  */
@@ -295,7 +293,7 @@ AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
 /**
  * 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);
@@ -439,28 +437,30 @@ AP_DECLARE(int) ap_discard_request_body(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 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
@@ -664,7 +664,14 @@ AP_DECLARE(void) ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r
  * @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