1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-25 10:59:28 +03:00
Commit Graph

65 Commits

Author SHA1 Message Date
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
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Joe Orton
a0570c8746 Move the POSIX reg* implementations into the ap_* namespace;
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
2005-02-11 12:00:41 +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
Nick Kew
0ebb8b9b9a Implement "Early" mode in mod_headers, and document it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104170 13f79535-47bb-0310-9956-ffa450edef68
2004-07-05 04:49:45 +00:00
André Malo
8fb0fc2705 Drop the ErrorHeader directive which turned out to be a misnomer.
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
2004-06-11 21:41:27 +00:00
André Malo
f6d2e82e3a allow %% to represent a literal %.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103446 13f79535-47bb-0310-9956-ffa450edef68
2004-04-18 20:26:07 +00:00
André Malo
d2dd505a5f allow env clauses also for 'echo' and 'unset'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103445 13f79535-47bb-0310-9956-ffa450edef68
2004-04-18 19:55:20 +00:00
André Malo
71b8739c3c Allow ErrorHeader echo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103444 13f79535-47bb-0310-9956-ffa450edef68
2004-04-18 19:42:34 +00:00
André Malo
46e408aa32 don't segfault, when setting an empty header value
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103442 13f79535-47bb-0310-9956-ffa450edef68
2004-04-18 19:17:43 +00:00
André Malo
d2b67717b6 simplifications
There's no need for different server and dir configs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103441 13f79535-47bb-0310-9956-ffa450edef68
2004-04-18 19:05:49 +00:00
André Malo
e71e4d1d21 remove unused parameters and minor memory leak
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103440 13f79535-47bb-0310-9956-ffa450edef68
2004-04-18 17:11:09 +00:00
André Malo
34d7a51e92 :retab
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103439 13f79535-47bb-0310-9956-ffa450edef68
2004-04-18 16:25:16 +00:00
André Malo
003d455502 allow RequestHeader to be conditional
PR: 27951
Basically submitted by: vincent gryzor.com (Vincent Deffontaines)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103269 13f79535-47bb-0310-9956-ffa450edef68
2004-04-05 17:34:48 +00:00
Joe Orton
0dbf5a122e * modules/metadata/mod_headers.c (header_inout_cmd): Remove redundant
conditional.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102832 13f79535-47bb-0310-9956-ffa450edef68
2004-03-01 15:51:25 +00:00
Joe Orton
0fed1575be Add 's' format tag to mod_headers to allow access to mod_ssl variables
without the overhead of SSLOptions +StdEnvVars/+ExportCertData; also
ensure that any multi-line envvars are unwrapped onto a single line.

* modules/metadata/mod_headers.c (header_request_ssl_var, unwrap_header,
header_post_config): New functions.
(header_pre_config): Register the 's' tag type.
(register_hooks): Add the post_config hook.

PR: 23223


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102809 13f79535-47bb-0310-9956-ffa450edef68
2004-02-28 21:44:30 +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
3d75c8c079 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102572 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:27:14 +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
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
Bill Stoddard
1a62142e9d Pick up declaration for insert_error_filter hook
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102070 13f79535-47bb-0310-9956-ffa450edef68
2003-12-15 23:04:44 +00:00
Ken Coar
80c64657a8 Allow retention of header fields on non-200 responses
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102068 13f79535-47bb-0310-9956-ffa450edef68
2003-12-15 19:59:23 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Bill Stoddard
346226ede7 Detabbify
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97396 13f79535-47bb-0310-9956-ffa450edef68
2002-11-04 18:31:57 +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
Justin Erenkrantz
798c1dae43 Add a filter_init function to the filters so that a filter can execute
arbitrary code before the handlers are invoked.

This resolves an issue with incorrect 304s on If-Modified-Since mod_include
requests since ap_meets_conditions() is not aware that this is a dynamic
request and it is not possible to satisfy 304 for these requests (unless
xbithack full is on, of course).  When mod_include runs as a filter, it is
too late to set any flag since the handler is responsible for calling
ap_meets_conditions(), which it should do before generating any data.

If a module doesn't need to run such arbitrary code, it can just pass NULL
as the argument and all is well.

PR:	9673
Reviewed by:	Ryan Bloom and others


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95906 13f79535-47bb-0310-9956-ffa450edef68
2002-06-28 08:40:25 +00:00
Jeff Trawick
bc0cf18899 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95151 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:33:10 +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
Justin Erenkrantz
3058b601ff As hinted on dev@httpd, change filter naming schemes to match our
expectations of their usage.

The reason that we should make this change now is that we have changed
the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should
be PROTOCOL while others should be CONTENT_SET.  In order to clarify it,
toss all of the bogus names and force the filter writers to make sure
they understand what they are doing.

CONTENT_SET is new (horrible name - change if you have better idea), but
it indicates that it should run between RESOURCE and PROTOCOL.
mod_deflate is the ideal CONTENT_SET filter.

The changed type names are:
CONTENT is now RESOURCE.
HTTP_HEADER is now PROTOCOL.  However, most filters that used HTTP_HEADER
may want CONTENT_SET.  (Only things like POP and HTTP belong as PROTOCOL.)

MMN bump since all filters need to be recompiled due to filter reordering.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93756 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 09:27:17 +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
Cliff Woolley
8038dc65d3 Fix constness compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91812 13f79535-47bb-0310-9956-ffa450edef68
2001-11-08 23:26:36 +00:00
Ian Holsman
3a64998113 add a new option '%{note-name}e' to headers.
This will output the value of the note (subprocess_env) into a header field


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91789 13f79535-47bb-0310-9956-ffa450edef68
2001-11-07 19:25:33 +00:00
Jeff Trawick
d1571eb1b2 initialize local condition_var var to keep garbage out of struct
header_entry->condition_var and avoid a segfault later

(untested, but it looks good to me :) )


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89273 13f79535-47bb-0310-9956-ffa450edef68
2001-06-06 10:43:46 +00:00
Jeff Trawick
2ef9ae8db7 ap_getword_conf wants const char **, not char **
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89272 13f79535-47bb-0310-9956-ffa450edef68
2001-06-06 00:54:06 +00:00
Bill Stoddard
80ed810f66 Extend mod_headers to support conditional driven Header
add, append and set. Use SetEnvIf to set an envar and conditionally
add/append/set headers based on this envar thusly:

     SetEnvIf TSMyHeader value HAVE_TSMyHeader
     Header add MyHeader "%t %D" env=HAVE_TSMyHeader

If the request contains header "TSMyHeader: value" then header
MyHeader: "t=xxxxxxxxxx D=yyyy" will be sent on the response.

Update mod_headers.html.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89271 13f79535-47bb-0310-9956-ffa450edef68
2001-06-05 21:44:48 +00:00
Jeff Trawick
265814910c void * isn't compatible with a function pointer; deal with retrieving a
function pointer from apr_hash_get()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89263 13f79535-47bb-0310-9956-ffa450edef68
2001-06-04 10:43:50 +00:00
Ben Laurie
7093cbc4f5 Function declaration must be a prototype.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89260 13f79535-47bb-0310-9956-ffa450edef68
2001-06-03 11:21:51 +00:00
Bill Stoddard
e99265048e Extend Header add|set|append support to accept format strings for the
header values.  Configure thusly:

Header add MyHeader "%t %D yadda"

%t is the time the request was received relative to CUT since the epoch measured in microseconds.
%D is the time delta from the time the request was received to the time the headers are sent
on the wire. To facilitate parsing the header response, %D results in the string D=xxx and
%t results in the string t=xxx. Thus the config directive above will result in this header
being included in the response:

MyHeader: t=991424704447256 D=3775428 yadda


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89255 13f79535-47bb-0310-9956-ffa450edef68
2001-06-01 19:55:48 +00:00
Bill Stoddard
bb2677a9e1 Return "1" to apr_table_do()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89254 13f79535-47bb-0310-9956-ffa450edef68
2001-06-01 19:34:23 +00:00
Bill Stoddard
18ce869320 Add the 'echo' option to mod_headers Header directive. Use the new option
like this:

Header echo regex

If a header received on a request matches regex, it is copied to the response
headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89250 13f79535-47bb-0310-9956-ffa450edef68
2001-06-01 02:58:44 +00:00
Graham Leggett
3fdc9ca62a Move the addition of default AP_HTTP_HTTP_HEADER filters to the insert_filter
phase so that other filters are not bypassed by default.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89196 13f79535-47bb-0310-9956-ffa450edef68
2001-05-21 23:47:21 +00:00
Jeff Trawick
ffd9419a69 Tru64 cc is bitchy about trailing commas in an enum list.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89172 13f79535-47bb-0310-9956-ffa450edef68
2001-05-20 09:31:04 +00:00
Roy T. Fielding
0386b53b47 Change directive HeaderOut back to Header and HeaderIn to RequestHeader.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89170 13f79535-47bb-0310-9956-ffa450edef68
2001-05-20 06:58:07 +00:00
Bill Stoddard
cd1eca7994 Reimplement mod_headers as an output filter. mod_headers can now
add custom headers to inbound requests using the HeaderIn directive
and to responses using the HeaderOut directive. The Header
directive has been deprecated in favor of the HeaderOut directive.

Submitted by: Graham Leggett
Reviewed by: Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89165 13f79535-47bb-0310-9956-ffa450edef68
2001-05-19 20:12:05 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +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
5dc34feb12 *) continued header revamping
*) torch some headers (and some libs) from the autoconf stuff


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88061 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 14:04:21 +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