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
- 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
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
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
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
request as they might be added to the header tables of the main request.
Otherwise these values might become invalid once the subrequest and its
pool gets destroyed.
PR: 48359
Submitted by: rpluem, niq
Reviewed by: niq
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@889408 13f79535-47bb-0310-9956-ffa450edef68
of the string to which *sa points is a %. In this case the while loop in
parse_format_string would call parse_format_tag with a pointer to a memory
region that starts one byte after the string to which s in parse_format_string
points to.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@499567 13f79535-47bb-0310-9956-ffa450edef68
internalise the ap_reg*<->PCRE wrapper:
* configure.in: Add srclib/pcre to the include path.
* include/ap_regex.h: Renamed from include/pcreposix.h. Prefix all
constants with AP_; prefix all functions and types with ap_. Define
AP_DECLARE to nothing if necessary. Remove regcomp error codes.
* include/httpd.h: Include ap_regex.h not pcreposix.h.
(ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/.
(ap_regexec, ap_regerror): Prototypes moved to ap_regex.h.
* server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree):
Adjust for ap_ prefixed types. (ap_regexec, ap_regerror): Removed.
* server/Makefile.in: Build util_pcre.c.
* server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use
of PCRE-internals to do error mapping; rename types to add AP_/ap_
prefixes as above. Use APR includes. (ap_regerror): Use apr_snprintf.
* srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la.
* modules/*: Update to use new type and constant names.
PR: 27750 (part one)
Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153384 13f79535-47bb-0310-9956-ffa450edef68
Instead there's a new optional flag for the Header directive
('always'), which keeps the former ErrorHeader functionality.
The opposite flag to 'always' is 'onsuccess'. So the new directives are written
as:
Header set foo bar
# which is the same as
Header onsuccess set foo bar
# and a subset of
Header always set foo bar
# which is what the ErrorHeader directive did.
Reviewed by: Brad Nicholes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103920 13f79535-47bb-0310-9956-ffa450edef68