You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2019/11/24 06:46:14 UTC

svn commit: r1870261 - in /httpd/httpd/branches/2.4.x: ./ modules/cache/ modules/loggers/ modules/lua/ modules/proxy/ modules/session/ modules/ssl/ server/

Author: jailletc36
Date: Sun Nov 24 06:46:13 2019
New Revision: 1870261

URL: http://svn.apache.org/viewvc?rev=1870261&view=rev
Log:
Synch 2.4.x and trunk:
Merge r1787229 from trunk
        - core: print r->uri during failure

Merge r1842919 from trunk
        - core: Call va_end before returning in the error case

Merge r1842926 from trunk
        - mod_cache_disk: fix a Coverity warning

Merge r1856490 from trunk
        - core: Provide TEST_CHAR macro in test_char.h

Merge r1862051 from trunk
        - tag some pools

Merge r1864865 from trunk
        - core: Fix a signed/unsigned comparison that can never match

Merge r1865871 from trunk
        - mod_session: leave a hint about session expiration at TRACE2

Merge r1867256 from trunk
        - mod_ssl: Fix a typo

Submitted by: covener,jorton,jorton,ylavic,jorton,jailletc36,covener,jailletc36
Reviewed by: jailletc36, jim, ylavic
Backported by: jailletc36

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c
    httpd/httpd/branches/2.4.x/modules/loggers/mod_log_forensic.c
    httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
    httpd/httpd/branches/2.4.x/modules/session/mod_session.c
    httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c
    httpd/httpd/branches/2.4.x/server/core.c
    httpd/httpd/branches/2.4.x/server/gen_test_char.c
    httpd/httpd/branches/2.4.x/server/protocol.c
    httpd/httpd/branches/2.4.x/server/util.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1787229,1842919,1842926,1856490,1862051,1864865,1865405,1865871,1867256

Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c Sun Nov 24 06:46:13 2019
@@ -994,10 +994,11 @@ static apr_status_t write_headers(cache_
             }
 
             rv = mkdir_structure(conf, dobj->hdrs.file, r->pool);
-
-            rv = apr_file_mktemp(&dobj->vary.tempfd, dobj->vary.tempfile,
-                                 APR_CREATE | APR_WRITE | APR_BINARY | APR_EXCL,
-                                 dobj->vary.pool);
+            if (rv == APR_SUCCESS) {
+                rv = apr_file_mktemp(&dobj->vary.tempfd, dobj->vary.tempfile,
+                                     APR_CREATE | APR_WRITE | APR_BINARY | APR_EXCL,
+                                     dobj->vary.pool);
+            }
 
             if (rv != APR_SUCCESS) {
                 ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00721)

Modified: httpd/httpd/branches/2.4.x/modules/loggers/mod_log_forensic.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/loggers/mod_log_forensic.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/loggers/mod_log_forensic.c (original)
+++ httpd/httpd/branches/2.4.x/modules/loggers/mod_log_forensic.c Sun Nov 24 06:46:13 2019
@@ -123,7 +123,7 @@ static char *log_escape(char *q, const c
 {
     for ( ; *p ; ++p) {
         ap_assert(q < e);
-        if (test_char_table[*(unsigned char *)p]&T_ESCAPE_FORENSIC) {
+        if (TEST_CHAR(*p, T_ESCAPE_FORENSIC)) {
             ap_assert(q+2 < e);
             *q++ = '%';
             ap_bin2hex(p, 1, q);

Modified: httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c Sun Nov 24 06:46:13 2019
@@ -216,6 +216,7 @@ static ap_lua_vm_spec *create_vm_spec(ap
     case AP_LUA_SCOPE_ONCE:
     case AP_LUA_SCOPE_UNSET:
         apr_pool_create(&pool, r->pool);
+        apr_pool_tag(pool, "mod_lua-vm");
         break;
     case AP_LUA_SCOPE_REQUEST:
         pool = r->pool;
@@ -2032,6 +2033,7 @@ static int lua_post_config(apr_pool_t *p
     }
     pool = (apr_pool_t **)apr_shm_baseaddr_get(lua_ivm_shm);
     apr_pool_create(pool, pconf);
+    apr_pool_tag(*pool, "mod_lua-shared");
     apr_pool_cleanup_register(pconf, NULL, shm_cleanup_wrapper,
                           apr_pool_cleanup_null);
     return OK;

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c Sun Nov 24 06:46:13 2019
@@ -1374,6 +1374,7 @@ static void * create_proxy_config(apr_po
     ps->source_address = NULL;
     ps->source_address_set = 0;
     apr_pool_create_ex(&ps->pool, p, NULL, NULL);
+    apr_pool_tag(ps->pool, "proxy_server_conf");
 
     return ps;
 }

Modified: httpd/httpd/branches/2.4.x/modules/session/mod_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/session/mod_session.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/session/mod_session.c (original)
+++ httpd/httpd/branches/2.4.x/modules/session/mod_session.c Sun Nov 24 06:46:13 2019
@@ -142,6 +142,7 @@ static apr_status_t ap_session_load(requ
 
        /* invalidate session if session is expired */
         if (zz && zz->expiry && zz->expiry < now) {
+            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "session is expired");
             zz = NULL;
         }
     }

Modified: httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c (original)
+++ httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c Sun Nov 24 06:46:13 2019
@@ -94,7 +94,7 @@ static const command_rec ssl_config_cmds
                 "Enable FIPS-140 mode "
                 "(`on', `off')")
     SSL_CMD_ALL(CipherSuite, TAKE12,
-                "Colon-delimited list of permitted SSL Ciphers, optional preceeded "
+                "Colon-delimited list of permitted SSL Ciphers, optional preceded "
                 "by protocol identifier ('XXX:...:XXX' - see manual)")
     SSL_CMD_SRV(CertificateFile, TAKE1,
                 "SSL Server Certificate file "
@@ -187,7 +187,7 @@ static const command_rec ssl_config_cmds
                 "('[+-][" SSL_PROTOCOLS "] ...' - see manual)")
     SSL_CMD_PXY(ProxyCipherSuite, TAKE12,
                "SSL Proxy: colon-delimited list of permitted SSL ciphers "
-               ", optionally preceeded by protocol specifier ('XXX:...:XXX' - see manual)")
+               ", optionally preceded by protocol specifier ('XXX:...:XXX' - see manual)")
     SSL_CMD_PXY(ProxyVerify, TAKE1,
                "SSL Proxy: whether to verify the remote certificate "
                "('on' or 'off')")

Modified: httpd/httpd/branches/2.4.x/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/core.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/core.c (original)
+++ httpd/httpd/branches/2.4.x/server/core.c Sun Nov 24 06:46:13 2019
@@ -4603,7 +4603,7 @@ AP_DECLARE_NONSTD(int) ap_core_translate
     }
     if (!r->uri || ((r->uri[0] != '/') && strcmp(r->uri, "*"))) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00126)
-                     "Invalid URI in request %s", r->the_request);
+                     "Invalid URI in request '%s' '%s'", r->uri, r->the_request);
         return HTTP_BAD_REQUEST;
     }
 

Modified: httpd/httpd/branches/2.4.x/server/gen_test_char.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/gen_test_char.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/gen_test_char.c (original)
+++ httpd/httpd/branches/2.4.x/server/gen_test_char.c Sun Nov 24 06:46:13 2019
@@ -167,7 +167,16 @@ int main(int argc, char *argv[])
         printf("0x%03x%c", flags, (c < 255) ? ',' : ' ');
     }
 
-    printf("\n};\n");
+    printf("\n};\n\n");
+
+    printf(
+      "/* we assume the folks using this ensure 0 <= c < 256... which means\n"
+      " * you need a cast to (unsigned char) first, you can't just plug a\n"
+      " * char in here and get it to work, because if char is signed then it\n"
+      " * will first be sign extended.\n"
+      " */\n"
+      "#define TEST_CHAR(c, f) (test_char_table[(unsigned char)(c)] & (f))\n"
+    );
 
     return 0;
 }

Modified: httpd/httpd/branches/2.4.x/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/protocol.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/protocol.c (original)
+++ httpd/httpd/branches/2.4.x/server/protocol.c Sun Nov 24 06:46:13 2019
@@ -2036,7 +2036,7 @@ static int r_flush(apr_vformatter_buff_t
 
 AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va)
 {
-    apr_size_t written;
+    int written;
     struct ap_vrprintf_data vd;
     char vrprintf_buf[AP_IOBUFSIZE];
 
@@ -2054,7 +2054,7 @@ AP_DECLARE(int) ap_vrprintf(request_rec
         int n = vd.vbuff.curpos - vrprintf_buf;
 
         /* last call to buffer_output, to finish clearing the buffer */
-        if (buffer_output(r, vrprintf_buf,n) != APR_SUCCESS)
+        if (buffer_output(r, vrprintf_buf, n) != APR_SUCCESS)
             return -1;
 
         written += n;
@@ -2100,6 +2100,7 @@ AP_DECLARE_NONSTD(int) ap_rvputs(request
 
         len = strlen(s);
         if (buffer_output(r, s, len) != APR_SUCCESS) {
+            va_end(va);
             return -1;
         }
 

Modified: httpd/httpd/branches/2.4.x/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util.c?rev=1870261&r1=1870260&r2=1870261&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util.c (original)
+++ httpd/httpd/branches/2.4.x/server/util.c Sun Nov 24 06:46:13 2019
@@ -75,13 +75,6 @@
  */
 #include "test_char.h"
 
-/* we assume the folks using this ensure 0 <= c < 256... which means
- * you need a cast to (unsigned char) first, you can't just plug a
- * char in here and get it to work, because if char is signed then it
- * will first be sign extended.
- */
-#define TEST_CHAR(c, f)        (test_char_table[(unsigned char)(c)] & (f))
-
 /* Win32/NetWare/OS2 need to check for both forward and back slashes
  * in ap_getparents() and ap_escape_url.
  */