conversion from apr_time_t to milliseconds instead
of hard-coded division by 1000.
Backport of r1839780 from trunk.
Submitted by: rjung
Reviewed by: rjung, rpluem, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1840032 13f79535-47bb-0310-9956-ffa450edef68
in milliseconds.
Backport of remaining parts of r1837590 from trunk
(only html mode changes, auto parts were already
backported).
Submitted by: rjung
Reviewed by: rjung, jim, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1839785 13f79535-47bb-0310-9956-ffa450edef68
in milliseconds to auto mode.
Partial backport of r1839532 from trunk
(only auto mode changes, html parts not yet
backported).
Submitted by: rjung
Reviewed by: rjung, jim, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1839533 13f79535-47bb-0310-9956-ffa450edef68
processes in the "cu" and "cs" values.
Add CPU time of the parent process to the
"c" and "s" values.
Backport of r1837595 from trunk.
Submitted by: rjung
Reviewed by: rjung, jim, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1839531 13f79535-47bb-0310-9956-ffa450edef68
MPMs in "auto" mode. Added number of processes,
number of stopping processes and number
of busy and idle workers.
This changes only the key/value list of the
server-status "auto" output. The data is already
part of the "html" output.
Backport of r1837589 from trunk.
Submitted by: rjung
Reviewed by: rjung, jim, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1839530 13f79535-47bb-0310-9956-ffa450edef68
Save a few bytes in the conf pool.
'push_item' and 'add_alt' already duplicate their parameters, so we can safely use the temp_pool here.
Use 'ap_cstr_casecmp' to simplify code.
Remove useless case. We know that to can not be NULL at this point.
Follow up to r1772812: update APLOGNO().
* modules/ssl/ssl_engine_kernel.c: Constify the ssl_hook_Fixup_vars array itself.
winnt/service: each log message should use its own APLOGNO.
Submitted by: jailletc36, ylavic, jorton, ylavic
Reviewed by: jailletc36, covener, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1793466 13f79535-47bb-0310-9956-ffa450edef68
Add IndexOptions UseOldDateFormat
*) mod_autoindex: Add IndexOptions UseOldDateFormat to allow the date
format from 2.2 in the Last Modified column. PR60846.
PR34014 / r903052 changed date format for autoindex
Submitted By: Hank Ibell <hwibell gmail.com>
update comments post-r1787525
no strncasecmp because flag has no value
Submitted by: covener
Reviewed by: covener, jim, druggeri
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1789963 13f79535-47bb-0310-9956-ffa450edef68
Display process slot number in the async overview
Fix the number of column for 'Async connections'.
There are only 3 columns (writing, keep-alive, closing), not 4.
Try to improve the code layout for it to be more readable.
Each <th> is on its own line so keep the corresponding "colspan" <td> fields grouped together.
r1738628 introduced a new column, 'Slot'.
Add an empty cell for it in the last line of the table, in order to fix the layout of the Totals.
Replace tab by spaces to be consistent
mod_status: note stopping procs in async info table
* add new column "stopping", denoting if a process is shutting down
* add additional "(old gen)", if a process is from before a graceful reload
* add counts of processes and stopping processes to summary line
Submitted by: sf, jailletc36, jailletc36, sf
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1772333 13f79535-47bb-0310-9956-ffa450edef68
Delay some memory allocation in order to save 272 bytes in the 'request' memory pool if mod_status handler is triggered and is not able to handle the request
Fix <p> tag closing syntax
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1759476 13f79535-47bb-0310-9956-ffa450edef68
compilation on win32 (haven't worked out the clean patch
to apr/build/fixwin32mak.pl for this, yet).
This caused no issues in the 2.4.20 package, and does not
block a release.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1738140 13f79535-47bb-0310-9956-ffa450edef68
Going forwards, keep win32 build in svn once a tree is stable.
Visual Studio 2010 users cannot convert our .dsp files, and
ddk toolchain users couldn't either.
Applies the same logic as r1100294 on the 2.2.x branch.
Until the cmake build schema is entirely mature, these files
are needed for command-line builds of the 2.4 tree, and are
expected to change very little until the EOL of 2.4 branch.
The .dsp source files are not directly usable for any shipping
version of MSVC/Visual Studio (post-Visual Studio 97 release),
while the .mak exports of these projects are usable on any flavor
of the MS nmake build environment. The .dsp source files are
retained for those users wishing to import these projects into
the modern vcproj/sln file format.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1736270 13f79535-47bb-0310-9956-ffa450edef68
Added many log numbers to log statements that
had none.
Those were not detected by the coccinelle script.
Submitted by: rjung
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1731085 13f79535-47bb-0310-9956-ffa450edef68
flush errors are TRACE1 in the core output filter now.
Remove APLOGNO after moving log message to
TRACE1 in r1724847.
Submitted by: covener, rjung
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1726018 13f79535-47bb-0310-9956-ffa450edef68
Add more data to "?auto" view of server-status.
Although mod_status source code calls this the
"short_report", the docs and the API flag call
it "Machine Readable" resp. "STAT_OPT_AUTO".
So IMHO the data shown should be on par with
the html version.
Followon to r1671396:
Remove unwanted redundant output introduced
by that commit.
Followon to r1671396: add misiing newline in
new server-status output.
Submitted by: rjung
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1674659 13f79535-47bb-0310-9956-ffa450edef68
Retry ENOENT like ECONNREFUSED, but only near a server restart.
PR57685
Submitted By: Edward Lu
Committed By: covener
Submitted by: covener
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1669559 13f79535-47bb-0310-9956-ffa450edef68
Rename module name in doxygen + partly revert r832442 which skipped doxygen doc generation for 'mod_watchdog.h'
s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles
Use ap_remove_input_filter_byhandle instead of duplicating the code.
Remove some 'register' in variable declaration.
Remove some 'register' in variable declaration.
Save a few cycles by calling 'apr_isalnum' instead of 'apr_isalpha' and 'apr_isdigit'.
Do not use deprecated define.
No change in generated code because MODULE_MAGIC_NUMBER is defined as:
#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR
Submitted by: jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1622705 13f79535-47bb-0310-9956-ffa450edef68
*) SECURITY: CVE-2014-0231 (cve.mitre.org)
mod_cgid: Fix a denial of service against CGI scripts that do
not consume stdin that could lead to lingering HTTPD child processes
filling up the scoreboard and eventually hanging the server.
[Rainer Jung, Eric Covener, Yann Ylavic]
Submitted By: rjung, covener, ylavic
Reviewed By: trawick, jorton, covener, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1610512 13f79535-47bb-0310-9956-ffa450edef68
SECURITY (CVE-2014-0226): Fix a race condition in scoreboard handling,
which could lead to a heap buffer overflow. Thanks to Marek Kroemeke
working with HP's Zero Day Initiative for reporting this.
* include/scoreboard.h: Add ap_copy_scoreboard_worker.
* server/scoreboard.c (ap_copy_scoreboard_worker): New function.
* modules/generators/mod_status.c (status_handler): Use it.
* modules/lua/lua_request.c (lua_ap_scoreboard_worker): Likewise.
Reviewed by: trawick, jorton, covener, jim
Submitted by: jorton, covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1610499 13f79535-47bb-0310-9956-ffa450edef68
* server/protocol.c (r_flush): Use int return type as per declaration
of apr_vformatter(); no functional change.
Use %pm in order to save 8k of stack in 'ap_pcfg_strerror'
s/apr_pstrndup/apr_pstrmemdup/ when applicable
follow-up to r1096569:
remove unnecessary total_modules calculation
Submitted by: jorton, jailletc36, jailletc36, trawick
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1569726 13f79535-47bb-0310-9956-ffa450edef68
Reduce stack usage, 32 bytes are enough here, no need to take 8k in the stack. (19 would be enough, but be safe...)
Use the size of the buffer as opposed to MAX_STRING_LEN.
Reduce stack usage, 32 bytes are enough here, no need to
take 8k in the stack. (19 would be enough, but be safe...)
Use the size of the buffer as opposed to MAX_STRING_LEN.
Followup to r1491221+r1491479: change consistently
the same code used in another place in the same file.
Submitted by: jailletc36, minfrin, rjung
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1492198 13f79535-47bb-0310-9956-ffa450edef68
Change bzero/bcopy into memset/memcpy
PR 54346
Can't figure out why we allocate len+2 bytes here. Len+1 should be enough.
Fix valgrind warning about uninitialized memory in argument to semctl
PR: 53690
Submitted by: Mikhail T. <mi+apache aldan algebra com>
fix valgrind warnings about uninitialized memory in syscall arguments
This is useful info for mod_status ;)
Add some __attribute__ for automatic format checking.
Correct one catch in sed0.c.
Correct some spelling.
Replace strdup by ap_malloc to ensure a proper error message if out-of-memory.
While there, only allocate memory for the string part we actually use.
PR: 54345
Exit with error message if out of mem
htdbm, htpasswd: print error message if out of memory
PR: 54345
Submitted by: jailletc36, sf, sf, jim, jailletc36, minfrin, sf, sf, sf
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1455225 13f79535-47bb-0310-9956-ffa450edef68
Replace use of apr_file_write() with apr_file_write_full() to prevent
incomplete writes.
Add comments in some places where error handling/logging is missing.
PR: 53131.
Submitted by: Nicolas Viennot <apache viennot biz>, Stefan Fritsch
Submitted by: sf
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1430514 13f79535-47bb-0310-9956-ffa450edef68
remove warning:
mod_remoteip.c:404:38: warning: data argument not used by format string [-Wformat-extra-args]
It's a hack, but maintain the orig hack ;)
Remove warnings
mod_speling.c:400:41: warning: data argument not used by format string [-Wformat-extra-args]
r->uri, nuri, ref);
mod_speling.c:508:53: warning: data argument not used by format string [-Wformat-extra-args]
r->uri, candidates->nelts, ref);
Use 'apr_is_empty_table()' instead of testing against 'apr_table_elts(...)->nelts'
Use ap_rputs instead of ap_rvputs where applicable.
No need to apr_pstrdup things here, 'apr_socket_accept_filter' already makes it own copy.
Not compiled nor tested as on my system APR_HAS_SO_ACCEPTFILTER is set to 0.
revert r1401448 and add a comment on why there's a bewildering copy
of args passed to apr_socket_accept_filter()
cppCheck: kill two warnings about incorrect printf parameters.
'worker_thread_count' is unsigned
cppCheck: same expression on both side of '|'.
Fix it the same way other messages are managed in the function.
Fix a few 'too many arguments for format' warnings
cppCheck: kill a unread variable warning
Submitted by: jim, jailletc36, jailletc36, jailletc36, trawick, jailletc36, jailletc36, sf, jailletc36
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1420696 13f79535-47bb-0310-9956-ffa450edef68
various mods: host and URI escaping:
Be sure to escape potential troubled strings
add missing html escaping
Submitted by: jim, sf
Reviewed by: covener, minfrin, sf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1418941 13f79535-47bb-0310-9956-ffa450edef68
* support/suexec.c: Add gcc format-string attributes to logging
functions.
(main): Always print uid/gid as unsigned long, and cast to avoid
warnings (which somewhat defeats the point of the format string
attrs, but is necessary since the size of gid/uid varies).
remove an unnecessary check in a nest loop of ap_create_environment()
s/;;/;/
No need to test for NULL before calling apr_pstrdup.
No need it apr_pcalloc here, the memory is fully initialized the line just after
cppCheck: unreadVariable - 'serviceFlag' is not used in the function, so remove it
Remove unused code. "Next week" hasn't happened in the last 10 years or so.
log client error at level debug, log broken Host header value
remove some more old unused code
remove obsolete comment from 1.3 days
Submitted by: jorton, pqf, jailletc36, jailletc36, jailletc36, jailletc36, sf, sf, sf, sf
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1416581 13f79535-47bb-0310-9956-ffa450edef68
Move away from DEFAULT_REL_RUNTIMEDIR and use
ap_runtime_dir_relative() API.
Backport of r1299718 from trunk.
Submitted by: jim
Reviwed by: rjung, trawick
Backported by: rjung
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1364709 13f79535-47bb-0310-9956-ffa450edef68