httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r123882 - in httpd/httpd/trunk: . include modules/arch/netware modules/dav/main modules/experimental modules/generators modules/http modules/mappers modules/proxy modules/ssl server
Date Sun, 02 Jan 2005 05:33:49 GMT
Author: wrowe
Date: Sat Jan  1 21:33:44 2005
New Revision: 123882

URL: http://svn.apache.org/viewcvs?view=rev&rev=123882
Log:

  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.

Modified:
   httpd/httpd/trunk/CHANGES
   httpd/httpd/trunk/include/ap_mmn.h
   httpd/httpd/trunk/include/http_protocol.h
   httpd/httpd/trunk/include/httpd.h
   httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
   httpd/httpd/trunk/modules/dav/main/util.c
   httpd/httpd/trunk/modules/experimental/mod_example.c
   httpd/httpd/trunk/modules/generators/mod_info.c
   httpd/httpd/trunk/modules/http/http_core.c
   httpd/httpd/trunk/modules/mappers/mod_rewrite.c
   httpd/httpd/trunk/modules/proxy/mod_proxy.c
   httpd/httpd/trunk/modules/ssl/mod_ssl.c
   httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
   httpd/httpd/trunk/server/core.c
   httpd/httpd/trunk/server/protocol.c

Modified: httpd/httpd/trunk/CHANGES
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/CHANGES?view=diff&rev=123882&p1=httpd/httpd/trunk/CHANGES&r1=123881&p2=httpd/httpd/trunk/CHANGES&r2=123882
==============================================================================
--- httpd/httpd/trunk/CHANGES	(original)
+++ httpd/httpd/trunk/CHANGES	Sat Jan  1 21:33:44 2005
@@ -2,6 +2,10 @@
 
   [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]

Modified: httpd/httpd/trunk/include/ap_mmn.h
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/ap_mmn.h?view=diff&rev=123882&p1=httpd/httpd/trunk/include/ap_mmn.h&r1=123881&p2=httpd/httpd/trunk/include/ap_mmn.h&r2=123882
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h	(original)
+++ httpd/httpd/trunk/include/ap_mmn.h	Sat Jan  1 21:33:44 2005
@@ -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

Modified: httpd/httpd/trunk/include/http_protocol.h
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/http_protocol.h?view=diff&rev=123882&p1=httpd/httpd/trunk/include/http_protocol.h&r1=123881&p2=httpd/httpd/trunk/include/http_protocol.h&r2=123882
==============================================================================
--- httpd/httpd/trunk/include/http_protocol.h	(original)
+++ httpd/httpd/trunk/include/http_protocol.h	Sat Jan  1 21:33:44 2005
@@ -608,13 +608,13 @@
 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

Modified: httpd/httpd/trunk/include/httpd.h
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/httpd.h?view=diff&rev=123882&p1=httpd/httpd/trunk/include/httpd.h&r1=123881&p2=httpd/httpd/trunk/include/httpd.h&r2=123882
==============================================================================
--- httpd/httpd/trunk/include/httpd.h	(original)
+++ httpd/httpd/trunk/include/httpd.h	Sat Jan  1 21:33:44 2005
@@ -278,9 +278,8 @@
 /**
  * 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

Modified: httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c&r1=123881&p2=httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c	(original)
+++ httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c	Sat Jan  1 21:33:44 2005
@@ -759,7 +759,7 @@
     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 @@
             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,9 +1105,9 @@
     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_default_port  (nwssl_hook_default_port,  NULL,NULL, APR_HOOK_MIDDLE);
-    ap_hook_insert_filter (ssl_hook_Insert_Filter, 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);
 
     APR_REGISTER_OPTIONAL_FN(ssl_is_https);
     APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);

Modified: httpd/httpd/trunk/modules/dav/main/util.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/dav/main/util.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/dav/main/util.c&r1=123881&p2=httpd/httpd/trunk/modules/dav/main/util.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/dav/main/util.c	(original)
+++ httpd/httpd/trunk/modules/dav/main/util.c	Sat Jan  1 21:33:44 2005
@@ -204,7 +204,7 @@
         /* ### not sure this works if the current request came in via https: */
         scheme = r->parsed_uri.scheme;
         if (scheme == NULL)
-            scheme = ap_http_method(r);
+            scheme = ap_http_scheme(r);
 
         /* insert a port if the URI did not contain one */
         if (comp.port == 0)

Modified: httpd/httpd/trunk/modules/experimental/mod_example.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/experimental/mod_example.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/experimental/mod_example.c&r1=123881&p2=httpd/httpd/trunk/modules/experimental/mod_example.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/experimental/mod_example.c	(original)
+++ httpd/httpd/trunk/modules/experimental/mod_example.c	Sat Jan  1 21:33:44 2005
@@ -913,7 +913,7 @@
  * phase.
  */
 #if 0
-static const char *x_http_method(const request_rec *r)
+static const char *x_http_scheme(const request_rec *r)
 {
     x_cfg *cfg;
 
@@ -921,8 +921,8 @@
     /*
      * Log the call and exit.
      */
-    trace_add(r->server, NULL, cfg, "x_http_method()");
-    return "foo";
+    trace_add(r->server, NULL, cfg, "x_http_scheme()");
+    return "example";
 }
 
 /*
@@ -1285,7 +1285,7 @@
                               APR_HOOK_MIDDLE);
     ap_hook_log_transaction(x_logger, NULL, NULL, APR_HOOK_MIDDLE);
 #if 0
-    ap_hook_http_method(x_http_method, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_http_scheme(x_http_scheme, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_default_port(x_default_port, NULL, NULL, APR_HOOK_MIDDLE);
 #endif
     ap_hook_translate_name(x_translate_handler, NULL, NULL, APR_HOOK_MIDDLE);

Modified: httpd/httpd/trunk/modules/generators/mod_info.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/generators/mod_info.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/generators/mod_info.c&r1=123881&p2=httpd/httpd/trunk/modules/generators/mod_info.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_info.c	(original)
+++ httpd/httpd/trunk/modules/generators/mod_info.c	Sat Jan  1 21:33:44 2005
@@ -249,7 +249,7 @@
     {"Create Request", ap_hook_get_create_request},
     {"Post-Read Request", ap_hook_get_post_read_request},
     {"Header Parse", ap_hook_get_header_parser},
-    {"HTTP Method", ap_hook_get_http_method},
+    {"HTTP Scheme", ap_hook_get_http_scheme},
     {"Default Port", ap_hook_get_default_port},
     {"Translate Path", ap_hook_get_translate_name},
     {"Map to Storage", ap_hook_get_map_to_storage},

Modified: httpd/httpd/trunk/modules/http/http_core.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/http/http_core.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/http/http_core.c&r1=123881&p2=httpd/httpd/trunk/modules/http/http_core.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c	(original)
+++ httpd/httpd/trunk/modules/http/http_core.c	Sat Jan  1 21:33:44 2005
@@ -95,7 +95,7 @@
     { NULL }
 };
 
-static const char *http_method(const request_rec *r)
+static const char *http_scheme(const request_rec *r)
 {
     return "http";
 }
@@ -224,7 +224,7 @@
     }
 
     ap_hook_map_to_storage(ap_send_http_trace,NULL,NULL,APR_HOOK_MIDDLE);
-    ap_hook_http_method(http_method,NULL,NULL,APR_HOOK_REALLY_LAST);
+    ap_hook_http_scheme(http_scheme,NULL,NULL,APR_HOOK_REALLY_LAST);
     ap_hook_default_port(http_port,NULL,NULL,APR_HOOK_REALLY_LAST);
     ap_hook_create_request(http_create_request, NULL, NULL, APR_HOOK_REALLY_LAST);
     ap_http_input_filter_handle =

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/mappers/mod_rewrite.c&r1=123881&p2=httpd/httpd/trunk/modules/mappers/mod_rewrite.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c	(original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c	Sat Jan  1 21:33:44 2005
@@ -735,7 +735,7 @@
     char *cp;
     apr_size_t l;
 
-    cp = (char *)ap_http_method(r);
+    cp = (char *)ap_http_scheme(r);
     l  = strlen(cp);
     if (   strlen(r->filename) > l+3
         && strncasecmp(r->filename, cp, l) == 0
@@ -807,7 +807,7 @@
                    : apr_psprintf(r->pool, ":%u", port);
 
         r->filename = apr_psprintf(r->pool, "%s://%s%s%s%s",
-                                   ap_http_method(r), thisserver, thisport,
+                                   ap_http_scheme(r), thisserver, thisport,
                                    (*r->filename == '/') ? "" : "/",
                                    r->filename);
     }
@@ -4184,7 +4184,7 @@
     thisurl = apr_table_get(r->subprocess_env, ENVVAR_SCRIPT_URL);
 
     /* set the variable */
-    var = apr_pstrcat(r->pool, ap_http_method(r), "://", thisserver, thisport,
+    var = apr_pstrcat(r->pool, ap_http_scheme(r), "://", thisserver, thisport,
                       thisurl, NULL);
     apr_table_setn(r->subprocess_env, ENVVAR_SCRIPT_URI, var);
 

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/mod_proxy.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/proxy/mod_proxy.c&r1=123881&p2=httpd/httpd/trunk/modules/proxy/mod_proxy.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c	(original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c	Sat Jan  1 21:33:44 2005
@@ -358,7 +358,7 @@
     if (conf->req && r->parsed_uri.scheme) {
         /* but it might be something vhosted */
         if (!(r->parsed_uri.hostname
-              && !strcasecmp(r->parsed_uri.scheme, ap_http_method(r))
+              && !strcasecmp(r->parsed_uri.scheme, ap_http_scheme(r))
               && ap_matches_request_vhost(r, r->parsed_uri.hostname,
                                           (apr_port_t)(r->parsed_uri.port_str ? r->parsed_uri.port

                                                        : ap_default_port(r))))) {

Modified: httpd/httpd/trunk/modules/ssl/mod_ssl.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ssl/mod_ssl.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/ssl/mod_ssl.c&r1=123881&p2=httpd/httpd/trunk/modules/ssl/mod_ssl.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/ssl/mod_ssl.c	(original)
+++ httpd/httpd/trunk/modules/ssl/mod_ssl.c	Sat Jan  1 21:33:44 2005
@@ -396,7 +396,7 @@
     return APR_SUCCESS;
 }
 
-static const char *ssl_hook_http_method(const request_rec *r)
+static const char *ssl_hook_http_scheme(const request_rec *r)
 {
     SSLSrvConfigRec *sc = mySrvConfig(r->server);
 
@@ -476,7 +476,7 @@
     ap_hook_pre_connection(ssl_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_test_config   (ssl_hook_ConfigTest,    NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_post_config   (ssl_init_Module,        NULL,NULL, APR_HOOK_MIDDLE);
-    ap_hook_http_method   (ssl_hook_http_method,   NULL,NULL, APR_HOOK_MIDDLE);
+    ap_hook_http_scheme   (ssl_hook_http_scheme,   NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_default_port  (ssl_hook_default_port,  NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_pre_config    (ssl_hook_pre_config,    NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_child_init    (ssl_init_Child,         NULL,NULL, APR_HOOK_MIDDLE);

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c?view=diff&rev=123882&p1=httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c&r1=123881&p2=httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c	(original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c	Sat Jan  1 21:33:44 2005
@@ -117,7 +117,7 @@
             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"))

Modified: httpd/httpd/trunk/server/core.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/core.c?view=diff&rev=123882&p1=httpd/httpd/trunk/server/core.c&r1=123881&p2=httpd/httpd/trunk/server/core.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/server/core.c	(original)
+++ httpd/httpd/trunk/server/core.c	Sat Jan  1 21:33:44 2005
@@ -958,10 +958,10 @@
     const char *host = get_server_name_for_url(r);
 
     if (ap_is_default_port(port, r)) {
-        return apr_pstrcat(p, ap_http_method(r), "://", host, uri, NULL);
+        return apr_pstrcat(p, ap_http_scheme(r), "://", host, uri, NULL);
     }
 
-    return apr_psprintf(p, "%s://%s:%u%s", ap_http_method(r), host, port, uri);
+    return apr_psprintf(p, "%s://%s:%u%s", ap_http_scheme(r), host, port, uri);
 }
 
 AP_DECLARE(apr_off_t) ap_get_limit_req_body(const request_rec *r)

Modified: httpd/httpd/trunk/server/protocol.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/protocol.c?view=diff&rev=123882&p1=httpd/httpd/trunk/server/protocol.c&r1=123881&p2=httpd/httpd/trunk/server/protocol.c&r2=123882
==============================================================================
--- httpd/httpd/trunk/server/protocol.c	(original)
+++ httpd/httpd/trunk/server/protocol.c	Sat Jan  1 21:33:44 2005
@@ -60,7 +60,7 @@
 APR_HOOK_STRUCT(
     APR_HOOK_LINK(post_read_request)
     APR_HOOK_LINK(log_transaction)
-    APR_HOOK_LINK(http_method)
+    APR_HOOK_LINK(http_scheme)
     APR_HOOK_LINK(default_port)
 )
 
@@ -503,7 +503,7 @@
     if (status == APR_SUCCESS) {
         /* if it has a scheme we may need to do absoluteURI vhost stuff */
         if (r->parsed_uri.scheme
-            && !strcasecmp(r->parsed_uri.scheme, ap_http_method(r))) {
+            && !strcasecmp(r->parsed_uri.scheme, ap_http_scheme(r))) {
             r->hostname = r->parsed_uri.hostname;
         }
         else if (r->method_number == M_CONNECT) {
@@ -1540,7 +1540,7 @@
                           (request_rec *r), (r), OK, DECLINED)
 AP_IMPLEMENT_HOOK_RUN_ALL(int,log_transaction,
                           (request_rec *r), (r), OK, DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(const char *,http_method,
+AP_IMPLEMENT_HOOK_RUN_FIRST(const char *,http_scheme,
                             (const request_rec *r), (r), NULL)
 AP_IMPLEMENT_HOOK_RUN_FIRST(unsigned short,default_port,
                             (const request_rec *r), (r), 0)

Mime
View raw message