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 2020/09/25 21:06:48 UTC
svn commit: r1882028 - in /httpd/httpd/branches/2.4.x/modules:
generators/mod_info.c loggers/mod_log_config.c ssl/ssl_engine_io.c
Author: jailletc36
Date: Fri Sep 25 21:06:48 2020
New Revision: 1882028
URL: http://svn.apache.org/viewvc?rev=1882028&view=rev
Log:
Merge r1880500, r1880501, r1880509 from trunk
* Slightly speed-up the execution of the test framework.
Submitted by: jailletc36
Reviewed by: jailletc36, rpluem, jorton
Backported by: jailletc36
Modified:
httpd/httpd/branches/2.4.x/modules/generators/mod_info.c
httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c
httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_io.c
Modified: httpd/httpd/branches/2.4.x/modules/generators/mod_info.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/generators/mod_info.c?rev=1882028&r1=1882027&r2=1882028&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/generators/mod_info.c (original)
+++ httpd/httpd/branches/2.4.x/modules/generators/mod_info.c Fri Sep 25 21:06:48 2020
@@ -230,7 +230,7 @@ static int mod_info_has_cmd(const comman
if (cmds == NULL)
return 1;
for (cmd = cmds; cmd->name; ++cmd) {
- if (strcasecmp(cmd->name, dir->directive) == 0)
+ if (ap_cstr_casecmp(cmd->name, dir->directive) == 0)
return 1;
}
return 0;
Modified: httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c?rev=1882028&r1=1882027&r2=1882028&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c Fri Sep 25 21:06:48 2020
@@ -1172,11 +1172,9 @@ static int config_log_transaction(reques
for (i = 0; i < format->nelts; ++i) {
strs[i] = process_item(r, orig, &items[i]);
- }
-
- for (i = 0; i < format->nelts; ++i) {
len += strl[i] = strlen(strs[i]);
}
+
if (!log_writer) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00645)
"log writer isn't correctly setup");
Modified: httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_io.c?rev=1882028&r1=1882027&r2=1882028&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_io.c Fri Sep 25 21:06:48 2020
@@ -2121,19 +2121,18 @@ static void ssl_io_data_dump(conn_rec *c
const char *b, long len)
{
char buf[256];
- char tmp[64];
- int i, j, rows, trunc;
+ int i, j, rows, trunc, pos;
unsigned char ch;
trunc = 0;
- for(; (len > 0) && ((b[len-1] == ' ') || (b[len-1] == '\0')); len--)
+ for (; (len > 0) && ((b[len-1] == ' ') || (b[len-1] == '\0')); len--)
trunc++;
rows = (len / DUMP_WIDTH);
if ((rows * DUMP_WIDTH) < len)
rows++;
ap_log_cserror(APLOG_MARK, APLOG_TRACE7, 0, c, s,
"+-------------------------------------------------------------------------+");
- for(i = 0 ; i< rows; i++) {
+ for (i = 0 ; i < rows; i++) {
#if APR_CHARSET_EBCDIC
char ebcdic_text[DUMP_WIDTH];
j = DUMP_WIDTH;
@@ -2144,32 +2143,30 @@ static void ssl_io_data_dump(conn_rec *c
memcpy(ebcdic_text,(char *)(b) + i * DUMP_WIDTH, j);
ap_xlate_proto_from_ascii(ebcdic_text, j);
#endif /* APR_CHARSET_EBCDIC */
- apr_snprintf(tmp, sizeof(tmp), "| %04x: ", i * DUMP_WIDTH);
- apr_cpystrn(buf, tmp, sizeof(buf));
+ pos = 0;
+ pos += apr_snprintf(buf, sizeof(buf)-pos, "| %04x: ", i * DUMP_WIDTH);
for (j = 0; j < DUMP_WIDTH; j++) {
if (((i * DUMP_WIDTH) + j) >= len)
- apr_cpystrn(buf+strlen(buf), " ", sizeof(buf)-strlen(buf));
+ pos += apr_snprintf(buf+pos, sizeof(buf)-pos, " ");
else {
ch = ((unsigned char)*((char *)(b) + i * DUMP_WIDTH + j)) & 0xff;
- apr_snprintf(tmp, sizeof(tmp), "%02x%c", ch , j==7 ? '-' : ' ');
- apr_cpystrn(buf+strlen(buf), tmp, sizeof(buf)-strlen(buf));
+ pos += apr_snprintf(buf+pos, sizeof(buf)-pos, "%02x%c", ch , j==7 ? '-' : ' ');
}
}
- apr_cpystrn(buf+strlen(buf), " ", sizeof(buf)-strlen(buf));
+ pos += apr_snprintf(buf+pos, sizeof(buf)-pos, " ");
for (j = 0; j < DUMP_WIDTH; j++) {
if (((i * DUMP_WIDTH) + j) >= len)
- apr_cpystrn(buf+strlen(buf), " ", sizeof(buf)-strlen(buf));
+ pos += apr_snprintf(buf+pos, sizeof(buf)-pos, " ");
else {
ch = ((unsigned char)*((char *)(b) + i * DUMP_WIDTH + j)) & 0xff;
#if APR_CHARSET_EBCDIC
- apr_snprintf(tmp, sizeof(tmp), "%c", (ch >= 0x20 && ch <= 0x7F) ? ebcdic_text[j] : '.');
+ pos += apr_snprintf(buf+pos, sizeof(buf)-pos, "%c", (ch >= 0x20 && ch <= 0x7F) ? ebcdic_text[j] : '.');
#else /* APR_CHARSET_EBCDIC */
- apr_snprintf(tmp, sizeof(tmp), "%c", ((ch >= ' ') && (ch <= '~')) ? ch : '.');
+ pos += apr_snprintf(buf+pos, sizeof(buf)-pos, "%c", ((ch >= ' ') && (ch <= '~')) ? ch : '.');
#endif /* APR_CHARSET_EBCDIC */
- apr_cpystrn(buf+strlen(buf), tmp, sizeof(buf)-strlen(buf));
}
}
- apr_cpystrn(buf+strlen(buf), " |", sizeof(buf)-strlen(buf));
+ pos += apr_snprintf(buf+pos, sizeof(buf)-pos, " |");
ap_log_cserror(APLOG_MARK, APLOG_TRACE7, 0, c, s, "%s", buf);
}
if (trunc > 0)
@@ -2177,7 +2174,6 @@ static void ssl_io_data_dump(conn_rec *c
"| %04ld - <SPACES/NULS>", len + trunc);
ap_log_cserror(APLOG_MARK, APLOG_TRACE7, 0, c, s,
"+-------------------------------------------------------------------------+");
- return;
}
long ssl_io_data_cb(BIO *bio, int cmd,