Christophe Jaillet
58dedee7d5
Save a few bytes of memory. This can be done in temp_pool.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1597182 13f79535-47bb-0310-9956-ffa450edef68
2014-05-23 21:12:16 +00:00
Mike Rumph
af0cfb57b7
Prevent an external proxy from presenting an internal proxy
...
in mod_remoteip.c. PR 55962.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588330 13f79535-47bb-0310-9956-ffa450edef68
2014-04-17 18:14:49 +00:00
Yann Ylavic
df97e149c0
mod_expires: don't add Expires header to error responses (4xx/5xx),
...
be they generated or forwarded. PR 55669.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584430 13f79535-47bb-0310-9956-ffa450edef68
2014-04-03 22:20:15 +00:00
Mike Rumph
18dedf6db5
Use the correct IP addresses to populate the proxy_ips field
...
in mod_remoteip.c. PR 55972.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1564475 13f79535-47bb-0310-9956-ffa450edef68
2014-02-04 20:38:01 +00:00
Mike Rumph
1ef8c3824c
Correct the trusted proxy match test in mod_remoteip. PR 54651.\n\nSubmitted By: Yoshinori Ehara <yoshinori ehara gmail com>\nEndorsed By: Eugene L <eugenel amazon com>\nCommited By: mrumph
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1564052 13f79535-47bb-0310-9956-ffa450edef68
2014-02-03 21:01:17 +00:00
Eric Covener
5a63e124b6
This is annoying to see in a casual "LogLevel debug foo:traceX ..."
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1552130 13f79535-47bb-0310-9956-ffa450edef68
2013-12-18 22:25:50 +00:00
Christophe Jaillet
9bda8db764
Ease logic around 'ap_getword_conf' and drop useless line of code.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1551009 13f79535-47bb-0310-9956-ffa450edef68
2013-12-15 10:23:07 +00:00
Christophe Jaillet
af7096d97d
s/equivalant/equivalent/ in comments
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1550828 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 19:56:41 +00:00
Christophe Jaillet
7c7861d8d1
Remove redundant check
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1550651 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 06:04:02 +00:00
Christophe Jaillet
b867906b6b
s/ip/IP/ in comments
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1550650 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 06:01:28 +00:00
Eric Covener
d5174b9fcd
If the "value" argument is prefixed with expr=, parse it with ap_expr
...
rather than mod_headers' built-in format strings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546801 13f79535-47bb-0310-9956-ffa450edef68
2013-12-01 11:23:22 +00:00
Daniel Ruggeri
ffdb1b50a1
Allow for format specifiers to be used in the base substitution string for Header edit
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1535788 13f79535-47bb-0310-9956-ffa450edef68
2013-10-25 17:16:46 +00:00
Eric Covener
46d97009e1
add "Header note" which was the solution for two users this week on IRC.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520908 13f79535-47bb-0310-9956-ffa450edef68
2013-09-08 20:04:06 +00:00
Joe Orton
b6728179bb
* modules/metadata/mod_unique_id.c: Replace use of hostname + pid with
...
PRNG output.
Submitted by: Jan Kaluza <jkaluza redhat.com>
Reviewed by: sf, jorton
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1501827 13f79535-47bb-0310-9956-ffa450edef68
2013-07-10 16:20:31 +00:00
Eric Covener
1c3427493e
provide a simple (no <If>) way to set a header only if it's not already there.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1496338 13f79535-47bb-0310-9956-ffa450edef68
2013-06-25 02:20:36 +00:00
Christophe Jaillet
9c2018878f
Reduce stack usage by 3k
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491724 13f79535-47bb-0310-9956-ffa450edef68
2013-06-11 10:17:02 +00:00
Christophe Jaillet
8e247b6cee
According to comment in 'magic_rsl_add' and to the way 'magic_rsl_printf' manages its buffer, I think that this memory should be apr_pstrdup'ed.
...
This has been like that forever, but seems broken to me.
Untested.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491700 13f79535-47bb-0310-9956-ffa450edef68
2013-06-11 07:41:40 +00:00
Christophe Jaillet
23b15cc92a
Close file in error path.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491234 13f79535-47bb-0310-9956-ffa450edef68
2013-06-09 16:00:18 +00:00
Ruediger Pluem
5f4c783e03
* Fix null pointer dereference in case SetEnvif and SetEnvIfExpr are used
...
together.
PR: 54881
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1471449 13f79535-47bb-0310-9956-ffa450edef68
2013-04-24 14:58:10 +00:00
Stefan Fritsch
e00688ffd9
Use %pm available since apr 1.3 instead of an extra call to apr_strerror
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463056 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 21:29:28 +00:00
Christophe Jaillet
bb69ec6cfe
Remove useless tests.
...
Turn
if (*x && apr_isspace(*x))
into
if (apr_isspace(*x))
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452128 13f79535-47bb-0310-9956-ffa450edef68
2013-03-03 21:25:46 +00:00
Christophe Jaillet
a0cc7380c3
Use 'apr_is_empty_table()' instead of testing against 'apr_table_elts(...)->nelts'
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1419781 13f79535-47bb-0310-9956-ffa450edef68
2012-12-10 21:24:59 +00:00
Jim Jagielski
41990042dd
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 ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407459 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 14:04:19 +00:00
Jim Jagielski
769f9a490b
Might as well show 'em all
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389566 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 20:51:03 +00:00
Jim Jagielski
25b64e92ed
Allow for exposure of loadavg and server load via mod_headers
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389565 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 20:51:00 +00:00
Guenter Knauf
7814748ab3
NetWare build tweaks.
...
Make more use of internal makefile macros;
axed now obsolete include paths.
Submitted by: normw gknw net.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371177 13f79535-47bb-0310-9956-ffa450edef68
2012-08-09 12:11:09 +00:00
Stefan Fritsch
f25013b32d
Compile the regex used by is_header_regex() only once during startup
...
This should save some memory, especially with .htaccess
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1343099 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 21:02:09 +00:00
Stefan Fritsch
3d98368058
Downgrade log message about adjusted IP address to trace1
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1304855 13f79535-47bb-0310-9956-ffa450edef68
2012-03-24 16:47:17 +00:00
Stefan Fritsch
76f782e188
Various code cleanup to avoid compiler, cppcheck, or clang warnings:
...
modules/debugging/mod_firehose.c: Make some internal functions static
(to do: logs_cleanup() is unused)
modules/filters/mod_charset_lite.c: Remove dead assignments
modules/filters/mod_include.c: likewise
modules/metadata/mod_usertrack.c: likewise
modules/proxy/mod_proxy_ftp.c: likewise
modules/ssl/ssl_engine_pphrase.c: likewise
modules/proxy/mod_proxy_balancer.c: likewise;
Remove NULL check that can never happen
modules/proxy/proxy_util.c: Axe NULL-check that can never happen and if it
would, it would just mask another bug
os/unix/unixd.c: likewise
modules/http/http_filters.c: Remove sub-condition that is always true
modules/lua/mod_lua.c: Add default cases to switch statements
modules/generators/mod_autoindex.c: Unsigned value can never be < 0
server/util_expr_eval.c: Fix compiler warnings with VC and on OS2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1220493 13f79535-47bb-0310-9956-ffa450edef68
2011-12-18 17:52:59 +00:00
Graham Leggett
cb21a0dbcc
Further clarify the naming of the entity that directly connects to us by
...
calling that entity a client instead of a peer.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00
Graham Leggett
2af2fa44ad
Further clarify the naming of the entity that originates the request by
...
calling that entity a useragent instead of a client.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214003 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:31:51 +00:00
Stefan Fritsch
0ecd2fe5e5
Remove usage of APLOG_NOERRNO. It has been a no-op since at least 2.0.x
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1211663 13f79535-47bb-0310-9956-ffa450edef68
2011-12-07 21:59:16 +00:00
Stefan Fritsch
92e366007c
Add lots of unique tags to error log messages
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
b4ec041ba7
Remove more log message prefixes that are now redundant as the
...
the error log format includes the module name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208110 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 22:28:21 +00:00
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
Graham Leggett
5a19e40f95
Style fixes, no functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203875 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 22:00:35 +00:00
Rainer Jung
cd94ba9c69
Change module sets and default activation status:
...
1) Promoted from "most" to "few"
- mod_headers
2) Demoted from "yes" to "most"
- mod_actions
- mod_allowmethods
- mod_auth_form
- mod_buffer
- mod_cgi(d)
- mod_include
- mod_negotiation
- mod_ratelimit
- mod_request
- mod_userdir
Remember: default module set is "most",
but only the LoadModule lines of all
modules except "yes" are commented out by default.
The following modules will now be loaded by default:
- mod_access_compat
- mod_alias
- mod_auth_basic
- mod_authn_core
- mod_authn_file
- mod_authz_core
- mod_authz_groupfile
- mod_authz_host
- mod_authz_user
- mod_autoindex
- mod_dir
- mod_env
- mod_filter
- mod_headers
- mod_log_config
- mod_mime
- mod_mpm_event
- mod_reqtimeout
- mod_setenvif
- mod_status
- mod_unixd
- mod_version
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1201111 13f79535-47bb-0310-9956-ffa450edef68
2011-11-12 00:12:50 +00:00
Stefan Fritsch
29a8aa54bb
Use random value instead of remote IP address in cookie value. This has the
...
advantage that we don't leak internal IP addresses in reverse proxy setups.
Also, use hex to make the cookie shorter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199987 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 21:43:49 +00:00
Stefan Fritsch
ca96890328
More ap_pregsub error checking/logging
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198966 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:58:52 +00:00
Stefan Fritsch
1356548ce0
More checks of ap_pregsub return values
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198959 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:47:39 +00:00
Stefan Fritsch
646971c214
Check return value of ap_pregsub()
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198948 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:29:57 +00:00
Stefan Fritsch
6c57e61b1b
Unify syntax of config directives taking an expression as optional contition argument
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1197413 13f79535-47bb-0310-9956-ffa450edef68
2011-11-04 07:27:07 +00:00
Stefan Fritsch
b9196c6dfd
Replace literal constant with AP_MAX_REG_MATCH
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1185849 13f79535-47bb-0310-9956-ffa450edef68
2011-10-18 20:51:35 +00:00
Stefan Fritsch
1596edb4a2
Fix configuration of internal proxies
...
PR: 49272
Submitted by: Jim Riggs <jim riggs me>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1185828 13f79535-47bb-0310-9956-ffa450edef68
2011-10-18 20:10:48 +00:00
Stefan Fritsch
fe0ac45b8e
Remove OID match which was never in a GA releas and is obsoleted by
...
SetEnvIfExpr with PeerExtList()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180828 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 08:42:30 +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
Stefan Fritsch
62441a77e4
Fix issues found by PVS-Studio static analyzer:
...
mod_mime_magic:
cut'n'paste error rsl_encoding vs. rsl_separator, also simplify code a bit
mod_header:
wrong string initialization (leading to segfault if format argument is missing)
util_win32: duplicate sizeof (untested; Windows people, please review)
PR: 51542
Submitted by: Andrey Karpov <karpov viva64 com>, Stefan Fritsch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172732 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 18:04:47 +00:00
Stefan Fritsch
19e145371d
initialize counter with random number
...
PR: 45110
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1171249 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15 19:54:37 +00:00
Eric Covener
f19d2caa4d
PR29755: mod_usertrack gets skipped when modules return a status code from
...
their fixup hook, and headers are also not sent on non-2xx responses.
Submitted by: Sami J. Mäkinen
Reviewed by: Eric Covener (modified to just run REALLY_FIRST)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154620 13f79535-47bb-0310-9956-ffa450edef68
2011-08-06 23:15:11 +00:00