Commit 60817e0c authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  FINALLY Correct ap_http_method()!  It is NOT a method, it's a SCHEME!

  Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
parent a46574a1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,10 @@ Changes with Apache 2.1.3
  [Remove entries to the current 2.0 section below, when backported]
  *) ap_http_scheme() replaced with ap_http_method() - this function
     returns the scheme (http v.s. https).
     [William Rowe]
  *) mod_proxy: Fix a request corruption problem and a buffering problem
     which sometimes prevented proxy-sendchunks from working.
     [Jeff Trawick]
+3 −2
Original line number Diff line number Diff line
@@ -84,14 +84,15 @@
 *                      changed ap_add_module, ap_add_loaded_module,
 *                      ap_setup_prelinked_modules, ap_process_resource_config
 * 20040425.1 (2.1.0-dev) Added ap_module_symbol_t and ap_prelinked_module_symbols
 * 20050101.0 (2.1.2-dev) Axed mixnamed http_method for http_scheme (which it was!)
 */

#define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */

#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20040425
#define MODULE_MAGIC_NUMBER_MAJOR 20050101
#endif
#define MODULE_MAGIC_NUMBER_MINOR 1                     /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 0                     /* 0...n */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+5 −5
Original line number Diff line number Diff line
@@ -608,13 +608,13 @@ AP_DECLARE_HOOK(int,post_read_request,(request_rec *r))
AP_DECLARE_HOOK(int,log_transaction,(request_rec *r))

/**
 * This hook allows modules to retrieve the http method from a request.  This
 * allows Apache modules to easily extend the methods that Apache understands
 * This hook allows modules to retrieve the http scheme for a request.  This
 * allows Apache modules to easily extend the schemes that Apache understands
 * @param r The current request
 * @return The http method from the request
 * @deffunc const char *ap_run_http_method(const request_rec *r)
 * @return The http scheme from the request
 * @deffunc const char *ap_run_http_scheme(const request_rec *r)
 */
AP_DECLARE_HOOK(const char *,http_method,(const request_rec *r))
AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r))

/**
 * Return the default port from the current request
+1 −2
Original line number Diff line number Diff line
@@ -278,9 +278,8 @@ extern "C" {
/**
 * Get the scheme for a request.
 * @param r The request
 * @bug This should be called ap_http_scheme!
 */
#define ap_http_method(r)	ap_run_http_method(r)
#define ap_http_scheme(r)	ap_run_http_scheme(r)

/** The default string lengths */
#define MAX_STRING_LEN HUGE_STRING_LEN
+5 −5
Original line number Diff line number Diff line
@@ -759,7 +759,7 @@ static int nwssl_hook_Fixup(request_rec *r)
    return DECLINED;
}

static const char *nwssl_hook_http_method (const request_rec *r)
static const char *nwssl_hook_http_scheme(const request_rec *r)
{
    if (isSecure(r) && !isSecureUpgraded(r))
        return "https";
@@ -854,7 +854,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
            if (strcEQ(var, "REQUEST_METHOD")) 
                result = r->method;
            else if (strcEQ(var, "REQUEST_SCHEME"))
                result = ap_http_method(r);
                result = ap_http_scheme(r);
            else if (strcEQ(var, "REQUEST_URI"))
                result = r->uri;
            else if (strcEQ(var, "REQUEST_FILENAME"))
@@ -1105,7 +1105,7 @@ static void register_hooks(apr_pool_t *p)
    ap_hook_pre_connection(nwssl_pre_connection, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_post_config(nwssl_post_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_fixups(nwssl_hook_Fixup, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_http_method(nwssl_hook_http_method,   NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_http_scheme(nwssl_hook_http_scheme, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_default_port(nwssl_hook_default_port, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_insert_filter(ssl_hook_Insert_Filter, NULL, NULL, APR_HOOK_MIDDLE);

Loading