1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00
Commit Graph

143 Commits

Author SHA1 Message Date
William A. Rowe Jr
894f2c0b75 Return mismatches... this solution simply won't work, as Ian reminded me.
Needs more work/time I don't have this afternoon, reverting to r 1.91


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96816 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 20:54:16 +00:00
William A. Rowe Jr
de2a40c0cc At least follow the proper failure path for failure to open the log file
or logging process.  Doesn't fix the lack of preflight testing.

Reviewed by: Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96814 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 20:36:30 +00:00
Ian Holsman
f2ef7ec192 change the log_writer declaration so that it takes a request_rec instead of
just a pool.
(so that the writer can get to things like hostname)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96666 13f79535-47bb-0310-9956-ffa450edef68
2002-09-06 03:00:11 +00:00
Ian Holsman
9db23288f2 its >>FNAME<< not >>name<<
doh


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96547 13f79535-47bb-0310-9956-ffa450edef68
2002-08-27 17:20:29 +00:00
Jeff Trawick
2e1a0ec6e2 make the type of the variable explicit to quiet a gcc warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96544 13f79535-47bb-0310-9956-ffa450edef68
2002-08-27 11:18:57 +00:00
Ian Holsman
e1cb208344 introduce 2 new callback oppurtunities to allow a 3rd party module to do
the actual writing of the log file.
also change buffered writing to make it runtime configurable instead of
compile time configurable.

i'm not 100% on the buffered output, mainly because I'm not sure it worked
in a thread safe way *before* this change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96538 13f79535-47bb-0310-9956-ffa450edef68
2002-08-26 23:23:45 +00:00
Jeff Trawick
0fd67ef418 use APR_TIME_T_FMT when formatting apr_time_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96099 13f79535-47bb-0310-9956-ffa450edef68
2002-07-17 16:08:53 +00:00
Brian Pane
980fac58f3 Replaced APR_USEC_PER_SEC division with the new apr_time_sec() macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95915 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 03:53:32 +00:00
Justin Erenkrantz
001b387bcd Change conn_rec->keepalive to an enumerated value of
AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE

This also fixes a problem where ap_discard_request_body would not discard
the body when keepalive was 0.  This actually meant the keepalive status
was unknown *not* closed, but no one ever remembered that.

This problem was seen with mod_dav sending error responses (as reported by
Karl Fogel).

Suggested by:	Greg "this isn't the '80s" Stein
Reviewed by:	Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95891 13f79535-47bb-0310-9956-ffa450edef68
2002-06-26 19:45:07 +00:00
Brian Pane
a343e3c5cb My logger timestamp cache was using an apr_time_t as the cache key.
apr_time_t has a resolution of 1 microsecond.

For some reason, the cache hit rate wasn't very high.  :-)

With this change, the cache key is now the time in seconds, not usec.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95588 13f79535-47bb-0310-9956-ffa450edef68
2002-06-09 04:48:41 +00:00
William A. Rowe Jr
178e10e3da Well the wrappers work out well... nice to be able to put off committing
these API changes until the evening ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95587 13f79535-47bb-0310-9956-ffa450edef68
2002-06-09 03:44:03 +00:00
William A. Rowe Jr
d53d71c887 Hmmm... gotta ask the wisdom in using aspecific types over apr_time_*_t
types.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95068 13f79535-47bb-0310-9956-ffa450edef68
2002-05-13 20:17:31 +00:00
Brian Pane
e6819f9589 Added caching of formatted timestamps to speed up the access logger when
using standard time format


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95046 13f79535-47bb-0310-9956-ffa450edef68
2002-05-12 08:09:13 +00:00
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Ian Holsman
da35725071 apr-utils rename apr_ansi_time_to_apr_time and
apr_exploded_time_t.

PR:
Obtained from:
Submitted by:	Thom May <thom@planetarytramp.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93733 13f79535-47bb-0310-9956-ffa450edef68
2002-03-06 17:55:38 +00:00
Aaron Bannert
d5fdaf9cfd The pre_config hook now takes a return value. This allows modules to
cause the server to bail out under error conditions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93063 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 23:49:40 +00:00
Ian Holsman
71de760992 wrowe's veto'd this.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92798 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 03:23:33 +00:00
Ian Holsman
23360cd007 new option LogExcludeByType
main use is so that you can ignore logging images
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92792 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 01:03:41 +00:00
Brian Pane
3b76538d51 Rearranged the log_request_time() code to eliminate the allocation
of an 8KB buffer on the stack when not using a custom time format


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92758 13f79535-47bb-0310-9956-ffa450edef68
2002-01-06 21:03:51 +00:00
Brian Pane
8894b833f2 Bypass a strdup and an 8KB local variable in the common case where
the logger is using the default time format


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92752 13f79535-47bb-0310-9956-ffa450edef68
2002-01-06 08:01:34 +00:00
Brian Pane
9d445c8f58 Replaced an instance of apr_pool_userdata_setn() with apr_pool_userdata_set()..
the value of "userdata_key" is an address on the stack when compiled with
gcc 2.95.3 on Solaris/Sparc, so storing the address directly in the hash
table is unsafe.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92497 13f79535-47bb-0310-9956-ffa450edef68
2001-12-16 09:54:14 +00:00
Ian Holsman
c7c6e876a9 change open_logs hook to return a value, allowing you to flag a error
while opening logs

Obtained from: Doug MacEachern


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92149 13f79535-47bb-0310-9956-ffa450edef68
2001-11-24 00:08:30 +00:00
William A. Rowe Jr
da3ae7591e Use the _setn flavor which will avoid strdup'ing these strings, and
skip the cleanups we don't need.

Submitted by: Brian Pane <bpane@pacbell.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91681 13f79535-47bb-0310-9956-ffa450edef68
2001-10-29 15:19:03 +00:00
Justin Erenkrantz
867166bede The call to apr_explode_localtime() in mod_log_config is one of the more
expensive operations in the httpd.  This patch attempts to reduce the
overhead by caching the result for 15 seconds.

Submitted by:	Brian Pane <bpane@pacbell.net>
Reviewed by:	Cliff Woolley, Ryan Bloom, Dean Gaudet, Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91083 13f79535-47bb-0310-9956-ffa450edef68
2001-09-19 06:53:26 +00:00
Victor J. Orlikowski
76692f2573 Fix a case where on restart, an admin started logging, and the logging
code waited to start until the second pass (assuming we were just starting
up) to open the log file. Also fix a typo.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90737 13f79535-47bb-0310-9956-ffa450edef68
2001-08-27 20:50:01 +00:00
William A. Rowe Jr
f1a4bc7d04 *) Changed the late-1.3 log_config substitution %c to %X (logs the
status of the closed connection) as it conflicts with the far more
     common, historical ssl logging directive %...{var}c.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90417 13f79535-47bb-0310-9956-ffa450edef68
2001-08-20 19:43:03 +00:00
Doug MacEachern
2090fa8748 adjust to apr_uri_ rename
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90361 13f79535-47bb-0310-9956-ffa450edef68
2001-08-19 16:01:05 +00:00
Cliff Woolley
de7d0daac0 Fix printf() warnings related to long->apr_off_t swap
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89738 13f79535-47bb-0310-9956-ffa450edef68
2001-07-26 18:40:27 +00:00
William A. Rowe Jr
5b71e358f3 Change the length of the content args to apr_off_t identifiers, and fix
mod_negotation to treat a size of -1 and indeterminate, instead of 0.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89727 13f79535-47bb-0310-9956-ffa450edef68
2001-07-26 15:53:15 +00:00
Greg Ames
9ffcdaf02b Reduce CPU consumption in conv_10 function, used to format "%d" by apr_*printf
This includes two changes to APR:
  * new functions apr_itoa, apr_ltoa, and apr_off_t_toa
    that provide itoa-type functionality based on pools
  * Inline code in inet_ntop4 to replace sprintf for converting
    binary IP addresses into dotted-decimal format

and two changes to Apache:
  * use the apr_itoa functions in setting the content length,
    in place of apr_psprintf
  * use the apr_itoa functions to replace frequent uses of
    'sprintf("%d",...)' in mod_log_config.

Submitted by: Brian Pane
Reviewed by:  Dean Gaudet, Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89686 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 22:55:29 +00:00
William A. Rowe Jr
1501c81198 Remove last public vestigages of APR_INHERIT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89600 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 19:41:20 +00:00
William A. Rowe Jr
1fa29a8d2d Obvious files that need inheritance, correct me if I'm wrong.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89561 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 21:07:40 +00:00
Roy T. Fielding
43b9634ceb Moved util_uri to apr-util/uri/apr_uri, which means adding the apr_
prefix to all of the uri functions (yuck), changing some includes,
and using APR error codes instead of HTTP-specific error codes.

Other notes to test this patch:
- You need to delete the util_uri.h file - exports picks up on this.
- I'd like to remove the apr_uri.h from httpd.h, but that might
  increase the complexity of this patch even further.  Once this patch
  is accepted (in some form), then I can focus on removing apr_uri.h
  from httpd.h entirely.  I need baby steps (heh) right now.
- I imagine that this might break a bunch of stuff in Win32 or other OS
  builds with foreign dependency files.  Any help here is appreciated.

This is a start...  -- justin

Submitted by:	Justin Erenkrantz
Reviewed by:	Roy Fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89198 13f79535-47bb-0310-9956-ffa450edef68
2001-05-22 01:31:12 +00:00
Bill Stoddard
97833cf137 Do not start piped log processes during the config file
preflight.  This change also circumvents a problem on
Windows where the rotatelog processes created during preflight
was not getting cleaned up properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89127 13f79535-47bb-0310-9956-ffa450edef68
2001-05-16 13:49:40 +00:00
Bill Stoddard
cebc827303 mod_log_config: %c connection status incorrectly logged
as "-" (non-keepalive) when MaxKeepAliveRequests is set to 0.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88974 13f79535-47bb-0310-9956-ffa450edef68
2001-05-02 13:37:22 +00:00
Ryan Bloom
6b5c21005a Put the keep-alive connection logging back.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88910 13f79535-47bb-0310-9956-ffa450edef68
2001-04-21 22:17:59 +00:00
Roy T. Fielding
4647e5f71a Revert the change that moved keepalives out of conn_rec. That variable
controls the number of requests per connection, regardless of the protocol
used by the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88908 13f79535-47bb-0310-9956-ffa450edef68
2001-04-21 12:23:37 +00:00
Bill Stoddard
2617b1c540 Fix seg fault at start-up introduced by Ryan's change to enabl
modules to specify their own logging tags. mod_log_config
registers an optional function, ap_register_log_handler().
ap_register_log_handler() was being called by http_core before
the directive hash table was created. This patch creates the
directive hash table before ap_register_log_handler() is
registered as an optional function.

Submitted by:  [jean-frederic clere <jfrederic.clere@fujitsu-siemens.com>]
Reviewed by:  Jeff Trawick, Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88904 13f79535-47bb-0310-9956-ffa450edef68
2001-04-20 17:59:05 +00:00
Ryan Bloom
dadd829c60 Allow modules to specify their own logging format specifier. Basically,
mod_log_config has registered an optional function, that other modules
can use to specify a function to be called.  This is analogous to the way
that mod_include works.  This also allows http to do the connection
logging itself, without exposing HTTP specific pieces to other modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88888 13f79535-47bb-0310-9956-ffa450edef68
2001-04-18 21:06:07 +00:00
Ryan Bloom
70a67b2c26 Move the keepalives field out of the conn_rec and into an HTTP specific
connection record.  This also moves some HTTP specific back out of the
core and into the HTTP module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88881 13f79535-47bb-0310-9956-ffa450edef68
2001-04-18 03:53:34 +00:00
Jeff Trawick
d3dcba691d tweak ap_get_remote_host() so that the caller can find out if she got
back an IP address

mod_access needed to know this, but the old code didn't handle IPv6


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88484 13f79535-47bb-0310-9956-ffa450edef68
2001-03-09 20:30:34 +00:00
Ryan Bloom
e552aeb0e3 Add a couple of GCC attribute tags to printf style functions. This also
fixes a couple of mismatched parameters highlighted revealed by the
attribute.
Submitted by:   Jon Travis <jtravis@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88271 13f79535-47bb-0310-9956-ffa450edef68
2001-02-22 04:05:58 +00:00
Martin Kraemer
e7d5943f28 Rename the module structures so that the exported symbol matches
the file name, and it is easier to automate the installation
process (generating LoadModule directives from the module filenames).

Next step is to remove the 4th argument to the APACHE_MODULE macro
completely and require people to use the matching names, and to
reduce the LoadModule directive to 1 argument.... Objections?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88189 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 13:38:31 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
Greg Stein
bb282b75f7 Clean up some of the includes:
- explicitly include apr_lib.h since ap_config.h doesn't
- use apr_want.h where possible
- use APR_HAVE_ where possible
- remove some unneeded includes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 13:05:29 +00:00
Bill Stoddard
12da73c42e Add new LogFormat directive, %D, to log time it takes to serve a request
in microseconds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88046 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 03:38:48 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
William A. Rowe Jr
40655f8641 Provide apr_pool_t arg to register_hooks, since anything they do in that
step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00