1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

382 Commits

Author SHA1 Message Date
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
Stefan Fritsch
32d9e326ef adjustments of build priorities of modules without special dependencies
all -> most:
- mod_sed

reallyall -> most:
- mod_log_debug

reallyall -> all:
- mod_dav_lock
- mod_echo
- mod_charset_lite
- mod_slotmem_plain
- mod_dialup

few -> all:
- mod_data
- mod_reflector
- mod_asis

most -> all:
- mod_heartbeat
- mod_heartmonitor
- mod_watchdog

most -> reallyall:
- mod_imagemap
- mod_cern_meta
- mod_ident

See thread at
http://mail-archives.apache.org/mod_mbox/httpd-dev/201107.mbox/%3C201107052321.56063.sf@sfritsch.de%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146227 13f79535-47bb-0310-9956-ffa450edef68
2011-07-13 18:59:28 +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
Jeff Trawick
782c711893 fix some dead assignments found by the clang analyzer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1098162 13f79535-47bb-0310-9956-ffa450edef68
2011-04-30 21:18:58 +00:00
Guenter Knauf
888ec80125 Use a var INSTALLBASE to simplify NetWare installation rules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 04:56:06 +00:00
Guenter Knauf
bab978c56e Use var for prelude so its possible to change it at one place.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082811 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 03:09:27 +00:00
Guenter Knauf
e8a8becc0f NetWare build overhaul in order to compile on Linux.
Removed absolute paths to imp files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079487 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 18:59:02 +00:00
Guenter Knauf
46b7e1d210 NetWare build overhaul in order to compile on Linux.
Take 1.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079407 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 16:04:40 +00:00
Stefan Fritsch
cafa2aaff5 Fix segfault for loglevel >= trace2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060072 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 20:14:54 +00:00
Eric Covener
7a76afb8b3 revert r1031670:
Change the default of the Header directive to apply to responses of all types
    instead of just 2xx successful responses.

This turned out to be do more harm than good for anything other 
than "set", since "always" doesn't ever see/operate on existing 
r->headers_out headers -- just err_headers_out. 

I think onsuccess needs to remain the default and this needs to move into a 
doc revamp.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053516 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 03:08:44 +00:00
Stefan Fritsch
b93e49391b Rename ap_expr's typedef names:
ap_expr            ->  ap_expr_t
ap_expr_parse_ctx  ->  ap_expr_parse_ctx_t
ap_expr_eval_ctx   ->  ap_expr_eval_ctx_t
ap_expr_lookup_fn  ->  ap_expr_lookup_fn_t
ap_expr_node_op    ->  ap_expr_node_op_e


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042146 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 11:22:30 +00:00
Stefan Fritsch
40a7329359 Fix SetEnvIfExpr to work with expressions that do not set the regexp
reference data.
Add some trace logging.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039876 13f79535-47bb-0310-9956-ffa450edef68
2010-11-28 13:01:59 +00:00
Stefan Fritsch
7ec578bc10 Fix segfault on parse error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039789 13f79535-47bb-0310-9956-ffa450edef68
2010-11-27 23:46:57 +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
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
44963dc104 Add SetEnvIfExpr directive to set env var depending on expression.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037137 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 08:50:46 +00:00
Stefan Fritsch
3037f411c9 use temp_pool for some temporary regexps
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033145 13f79535-47bb-0310-9956-ffa450edef68
2010-11-09 18:34:43 +00:00
Stefan Fritsch
35cdba6976 Replace ap_expr with a parser derived from mod_ssl's parser. Make mod_ssl use
the new parser. Rework ap_expr's public interface and provide hooks for modules
to add variables and functions.

The Netware and Windows build files still need to be adjusted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032073 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 14:31:16 +00:00
Eric Covener
c145eb760d Change the default of the Header directive to apply to responses of all types
instead of just 2xx successful responses.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031670 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 17:20:31 +00:00
Eric Covener
5398ce8195 rename the mod_headers variables used to track onsuccess vs. always for clarity
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031669 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 17:15:50 +00:00
Stefan Fritsch
00f70ddc9a more temp pool usage and remove some useless apr_pstrdup()s
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026660 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 18:35:06 +00:00
Stefan Fritsch
6f7f117b5d use temp_pool for version parsing, to save some memory
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026637 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 16:27:52 +00:00
Graham Leggett
4009e52304 Simplify the initialisation before mod_env's fixup.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024467 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 23:46:29 +00:00
Stefan Fritsch
affc4cf328 save some memory by using cmd->temp_pool instead of cmd->pool in some places
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002156 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 13:19:33 +00:00
Stefan Fritsch
b65066c6ac Add generate_log_id hook to allow to use the ID generated by mod_unique_id as
error log ID for requests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002125 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 11:53:17 +00:00
Ruediger Pluem
80c94d081e * - temp_sa is already the correct pointer
- use temp_sa instead of temp_sa_buff which is not a pointer

Pointed by: Andrew Skalski <voltara gmail.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@990746 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 09:45:34 +00:00
Ruediger Pluem
f6299b1324 * temp_sa is already the correct pointer.
PR: 49838
Submitted by: Andrew Skalski <voltara gmail.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@990745 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 09:41:38 +00:00
Jeff Trawick
b79b3b5ba8 axe unexpected ';' after end of block
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983066 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 17:39:26 +00:00
Jeff Trawick
0ce133f8a8 Intel's compiler warns about assigning the non-enum value 0 to the
enumeration apr_finfo_t.filetype, which is done when forgetting
the previously-derived file type

use the appropriate enum value APR_NOFILE instead

Also change comparisons of the field with 0 to use APR_NOFILE instead,
as is the practice of some existing code.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983065 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 17:36:52 +00:00
Stefan Fritsch
f0fdf298c3 remove some useless use of strlen()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982017 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 19:49:21 +00:00
Stefan Fritsch
02dc2d45cf Code cleanup: replace strncpy by apr_cpystrn or apr_pstrmemdup
Submitted by: Takashi Sato <takashi lans tv com>
PR: 43432


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@981086 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 20:08:44 +00:00
Stefan Fritsch
e64d66b803 Update docs and comment: the unique id is now 24 characters, not 19
Submitted by: Takashi Sato <takashi lans-tv com>, Stefan Fritsch
PR: 36269


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@981084 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 19:56:51 +00:00
Guenter Knauf
5e8988e256 Removed obsolete include paths from NetWare makefiles.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@966904 13f79535-47bb-0310-9956-ffa450edef68
2010-07-22 23:38:58 +00:00
Nick Kew
8dfbc67165 Fix omission in r894036 noted by rpluem.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@966059 13f79535-47bb-0310-9956-ffa450edef68
2010-07-21 00:20:43 +00:00
Stefan Fritsch
ee04f0746f Add comment that using cur_unique_id.counter from all threads is bad for
performance on SMP systems.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@954213 13f79535-47bb-0310-9956-ffa450edef68
2010-06-13 12:44:51 +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
Jeff Trawick
1477c61e6f odd assortment of spelling fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@947651 13f79535-47bb-0310-9956-ffa450edef68
2010-05-24 14:26:49 +00:00
Joe Orton
e588bbc955 * modules/metadata/mod_headers.c: Add a function pointer type for
the tag handler callback to regain some type-safety.
  (register_format_tag_handler, header_pre_config): Adjusted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@946173 13f79535-47bb-0310-9956-ffa450edef68
2010-05-19 13:15:21 +00:00
William A. Rowe Jr
115c1e496d Correctly align the behavior of headers_in to be consistent with the
treatment of headers_out, resolving PR 48359 by keeping subrequest
scope changes out of the main request headers.  This ensures that all
requests-without-bodies behave as the requests-with-bodies code has.

Mitre: CVE-2010-0434


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@901578 13f79535-47bb-0310-9956-ffa450edef68
2010-01-21 07:19:41 +00:00