1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

153 Commits

Author SHA1 Message Date
Graham Leggett
394e5594d6 Introduce a per connection "peer_ip" and a per request "client_ip" to
distinguish between the raw IP address of the connection and the effective
IP address of the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
Graham Leggett
4ee7eea4cf Introduce a per request version of the remote IP address, which can be
optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:10:39 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Rich Bowen
0084dd7fc6 Removes the CookieLog directive, which has been documented as deprecated for more than a decade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172625 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 13:40:08 +00:00
Stefan Fritsch
46d4791a5d Add string valued expressions to ap_expr, do some API cleanup
- add possibility to have expressions that evaluate to a string and not to
  a boolean value
- modify ap_expr_parse_cmd() interface to support this and make it more
  convenient to use in general
- rename AP_EXPR_FLAGS_* to AP_EXPR_FLAG_* for consistency


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142164 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 07:45:00 +00:00
Stefan Fritsch
51226bdcca Fix various "variable 'x' set but not used" warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125877 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 07:42:18 +00:00
Jim Jagielski
5be9e95be8 Close PR 50861 where enabling and disabling of buffered
logs can cause a segfault. Patch by: Torsten Förtsch <torsten.foertsch@gmx.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082518 13f79535-47bb-0310-9956-ffa450edef68
2011-03-17 15:04:08 +00:00
Stefan Fritsch
b6649687a3 More ap_expr updates:
- minor bump for ap_expr_exec_re() introduced in r1037504
- actually commit the changes to allow using backreferences in SetEnvIfExpr
- automatically add the correct entries to the Vary-header if the result of
  an expression evaluation depends on a request header
  (can be turned off by setting the AP_EXPR_FLAGS_DONT_VARY flag)
- set AP_EXPR_FLAGS_DONT_VARY in mod_log_config's conditional logging
- fix various off-by-one errors in req_table_func


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037540 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 19:51:41 +00:00
Stefan Fritsch
aa5d9268f3 detab
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037143 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 09:13:18 +00:00
Stefan Fritsch
c40fa87ce7 Log errors/infos during expression evaluation and associate the message
with the module that is calling ap_expr_exec()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037140 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 08:59:50 +00:00
Stefan Fritsch
60d6e32249 Add support for conditional logging depending on an expression.
The syntax is a bit unwieldy, the quotes have to start before
the 'expr=':

    CustomLog "logs/cond_log" combined "expr=req('User-Agent') == 'x'"


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033157 13f79535-47bb-0310-9956-ffa450edef68
2010-11-09 18:59:33 +00:00
Stefan Fritsch
70be0f7a07 Add ErrorLogFormat directive for configuring the error log format, including
additional information that is logged once per connection or request.

Add error log IDs for connections and request to allow correlating error log
lines and the corresponding access log entry.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992806 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 15:44:19 +00:00
Rainer Jung
0fa11f3ff9 Adding sub second timestamps and request end time to mod_log_config.
Add special format tokens to %{...}t. The extended syntax allows the
form: "WHICH:WHAT".

WHICH is either:
- "begin": use the time when the request started
- "end": take "now" as the time
You can omit WHICH, default is "begin".
If you omit WHICH, the separating column is not allowed.

WHAT is either:
- "sec": timestamp in Unix seconds
- "msec": timestamp in Unix milliseconds
- "msec_frac": millisecond fraction of the Unix timestamp,
               3 digits, 0-padded
- "usec": timestamp in Unix microseconds
- "usec_frac": microsecond fraction of the Unix timestamp
               6 digits, 0-padded
- anything different from those tokens: use strftime()
You can omit WHAT, default is the formatted timestamp as
used by the Common Log Format.

The implementation uses a new request_config for mod_log_config
to pass the request end time around between different calls to
log formatters, but the end time is only generated if needed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@979120 13f79535-47bb-0310-9956-ffa450edef68
2010-07-25 21:08:15 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Graham Leggett
5314f77c08 mod_log_config: Add the R option to log the handler used within the
request.
Submitted by: Christian Folini <christian.folini netnea com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@905420 13f79535-47bb-0310-9956-ffa450edef68
2010-02-01 21:38:15 +00:00
Stefan Fritsch
6af9d4c85f fix off by one error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834500 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 15:29:04 +00:00
Stefan Fritsch
16f79b1337 Also remove trailing whitespace in the value
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834013 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 10:43:16 +00:00
Stefan Fritsch
5cd0618812 Simplify code by using apr_strtok
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834006 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 09:59:53 +00:00
Stefan Fritsch
12e2a81ffc mod_log_config: Make ${cookie}C correctly match whole cookie names
instead of substrings.

PR: 28037
Submitted by: Dan Franklin <dan dan-franklin.com>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833738 13f79535-47bb-0310-9956-ffa450edef68
2009-11-07 19:19:10 +00:00
Jim Jagielski
3a1bc532d2 Backported
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@721034 13f79535-47bb-0310-9956-ffa450edef68
2008-11-26 23:25:37 +00:00
Jim Jagielski
51df5d37cb Make %k work as it should. No regression noted in perl
test framework.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@720250 13f79535-47bb-0310-9956-ffa450edef68
2008-11-24 18:33:09 +00:00
Jim Jagielski
8adcd5a5ac Add in useful feature. %k which logs the keepalives
value.
PR: 45762
        Dan Poirier <poirier@pobox.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@693120 13f79535-47bb-0310-9956-ffa450edef68
2008-09-08 14:52:21 +00:00
Ruediger Pluem
fc83c6138a * Do case insensitive compares for the type of formats of the pid / tid.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@579517 13f79535-47bb-0310-9956-ffa450edef68
2007-09-26 08:44:37 +00:00
Jeff Trawick
c105e90a86 mod_log_config: Add format options for %p so that the actual local
or remote port can be logged.  

PR:  43415
Submitted by: Adam Hasselbalch Hansen <ahh@one.com>
Extensively commented on and/or modified by Ruediger Pluem and Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@579425 13f79535-47bb-0310-9956-ffa450edef68
2007-09-26 01:45:16 +00:00
Ruediger Pluem
5481e4b70a * Remove function format_integer as it is only used by pfmt and just a needless
wrapper around apr_itoa. Thus replace its call by apr_itoa.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@578927 13f79535-47bb-0310-9956-ffa450edef68
2007-09-24 19:30:59 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
d81de0d9b3 Add ap_append_pid(); This is performed enough to warrant
a function I think, especially with the fact that
the mapping of getpid() to APR_PID_T_FMT isn't
consistant in some areas. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:22:08 +00:00
Jeff Trawick
5b3a9d83fd mod_log_config: %{hextid}P will log the thread id in hex with APR
versions 1.2.0 or higher.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265033 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 12:34:07 +00:00
Brian Pane
34e82d6a25 use struct assignment instead of memcpy so the compiler can decide whether to inline the copy loop or call memcpy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@208972 13f79535-47bb-0310-9956-ffa450edef68
2005-07-03 21:21:46 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Paul Querna
196fce4667 * mod_log_config.c: Revert r109866 which used apr_file_writev instead of an
apr_file_write w/ a memcpy. Roy Fielding provided a -1 veto
                    on the commit, based on concerns that writev is not 
                    guaranteed to be atomic like a write.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@110069 13f79535-47bb-0310-9956-ffa450edef68
2004-12-07 03:41:18 +00:00
Paul Querna
9d58018f5e mod_log_config.c: Use iovecs to write the log line to eliminate a memcpy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109866 13f79535-47bb-0310-9956-ffa450edef68
2004-12-05 07:05:23 +00:00
Jeff Trawick
ecab476cae mod_log_config: Fix a bug which prevented request completion time
from being logged for I_INSIST_ON_EXTRA_CYCLES_FOR_CLF_COMPLIANCE
processing.

PR:             29696
Submitted by:   Alois Treindl <alois astro.ch>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103991 13f79535-47bb-0310-9956-ffa450edef68
2004-06-20 13:08:06 +00:00
André Malo
e47931813e this should save one or two cycles
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103767 13f79535-47bb-0310-9956-ffa450edef68
2004-05-25 19:39:50 +00:00
Joe Orton
96c0ef3f90 * modules/loggers/mod_log_config.c, server/log.c (open_error_log,
ap_replace_stderr_log): Use APR_LARGEFILE when opening log files, to
allow log files to exceed the 2Gb limit if necessary.

PR: 13511


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103627 13f79535-47bb-0310-9956-ffa450edef68
2004-05-06 10:18:07 +00:00
André Malo
c2a3b20bea cleanup log_header_out function:
- no need to ask r->err_headers_out, because it's already merged with
  r->headers_out at this stage
- allow multiple headers like Set-Cookie to be logged properly

PR: 27787


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103331 13f79535-47bb-0310-9956-ffa450edef68
2004-04-10 17:48:52 +00:00
Jeff Trawick
3273ddb6de fix an old misfeature: "BufferedLogs Off" would sort-of turn
buffered logging on as it set the log writer to the buffered log
writer, though it would leave the are-logs-buffered flag off

this misfeature combined with recent mutex logic for buffered logs
led to a segfault with "BufferedLogs Off"


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102783 13f79535-47bb-0310-9956-ffa450edef68
2004-02-26 20:15:26 +00:00
Jeff Trawick
7122d6ea3a a kind fix for a compile error unfortunately broke an order
dependency...  the buffered logs array needs to be initialized
prior to opening the logs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102781 13f79535-47bb-0310-9956-ffa450edef68
2004-02-26 20:00:55 +00:00
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
5410a0d131 fix copyright dates according to the first checkin
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102566 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:10:29 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
866b6af8f3 in conservative C declarations still have to be the first in a function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102361 13f79535-47bb-0310-9956-ffa450edef68
2004-01-18 00:00:18 +00:00
Jeff Trawick
e6834bc9b4 mod_log_config: Fix corruption of buffered logs with threaded
MPMs.

PR:               25520


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102355 13f79535-47bb-0310-9956-ffa450edef68
2004-01-17 00:16:45 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Joe Orton
3be85f7869 * modules/loggers/mod_log_config.c (log_request_time): Log
the minutes component of the timezone correctly.

PR: 23642
Submitted by: Hong-Gunn Chew <hgbug@gunnet.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101703 13f79535-47bb-0310-9956-ffa450edef68
2003-11-05 17:16:00 +00:00
André Malo
fa20e7a4a7 fix %b format to write really "-" if bytes_sent == 0.
Submitted by: Kess


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101021 13f79535-47bb-0310-9956-ffa450edef68
2003-08-19 16:03:03 +00:00
Jeff Trawick
4144e68db8 fix a comment to explain how to log the thread id
Submitted by:          nd


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99818 13f79535-47bb-0310-9956-ffa450edef68
2003-05-14 02:32:41 +00:00
Jeff Trawick
ab74e345f0 as Andre' pointed out, we don't need %{pid/tid}P since the user
can do %P/%{tid}P or %{pid}P/%{tid}P


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99449 13f79535-47bb-0310-9956-ffa450edef68
2003-04-19 03:06:30 +00:00