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

56 Commits

Author SHA1 Message Date
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
Ian Holsman
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +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
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
André Malo
74bf9ef099 oof. Strip all non-public stuff from mod_rewrite.h and
reorder the code in mod_rewrite.c in order to get a rid of
the forward declaration. Cleaned up the comments as well.

No real code change, but a quite big diff ...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100792 13f79535-47bb-0310-9956-ffa450edef68
2003-07-26 20:32:24 +00:00
André Malo
7f68f45af6 optimization/cleanup.
The generic flagparser (read: lexer) for RewriteRules and RewriteConds
does the same except for one function call.
Collapse these to functions to one and make the result more
readable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100772 13f79535-47bb-0310-9956-ffa450edef68
2003-07-24 19:06:33 +00:00
André Malo
b0572362e9 optimization; rewrite the do_expand function in order to:
+ give it a better interface
  + get a rid of most of the fixed stack buffers and then
  + no longer limit rewritten uris, expanded variables etc to
    2k
  + make it better readable and understandable at all.

This is a two-tiered commit for better diffs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100675 13f79535-47bb-0310-9956-ffa450edef68
2003-07-17 21:18:02 +00:00
André Malo
3aae3ae057 optimization: no need to use the pool here. This is
obviously a static value.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100651 13f79535-47bb-0310-9956-ffa450edef68
2003-07-16 18:23:37 +00:00
André Malo
1af42640c5 optimization: no need to search linear for headers.
apr_table_get should be more efficient nearly always.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100644 13f79535-47bb-0310-9956-ffa450edef68
2003-07-15 23:30:40 +00:00
André Malo
811bb3ecab Prevent endless loops of internal redirects in mod_rewrite by
aborting after exceeding a limit of internal redirects. The
limit defaults to 10 and can be changed using the RewriteOptions
directive with the new MaxRedirects=n argument.
(The latter required some restructuring of the RewriteOptions
 evaluation code).

(Documentation patch follows asap)

PR: 17462


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98863 13f79535-47bb-0310-9956-ffa450edef68
2003-03-01 18:35:50 +00:00
André Malo
5cede9cd45 Fix mod_rewrite's abs_URI handling.
- uris were partially not correctly escaped (in particular:
  ldap, news, mailto)
- not all uri schemes contain an authority component (//)
- add nntp:// scheme
- don't add a query string (and drop r->args) if it's not
  http or mailto scheme
- be more efficient (think so)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98808 13f79535-47bb-0310-9956-ffa450edef68
2003-02-27 02:50:04 +00:00
André Malo
5c89fed043 This is part two.
It fixes the prefix_stat function. (which does a stat call on the first
path segment). This function was still tailored for unix systems only.
It should work on other systems as well now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98782 13f79535-47bb-0310-9956-ffa450edef68
2003-02-24 21:44:15 +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
Jeff Trawick
a424be649c add the ability to specify the dbm type (e.g., gdbm, ndbm) for
dbm rewrite maps

use dbm:filename for the default type

use dbm=TYPE:filename for a non-default type


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96493 13f79535-47bb-0310-9956-ffa450edef68
2002-08-23 12:49:08 +00:00
Jeff Trawick
e45968b202 remove some remaining NO_DBM_REWRITEMAP cruft from mod_rewrite
which broke the build on Win32

mod_rewrite.h didn't spit out the decl of lookup_map_dbmfile
if NO_DBM_REWRITEMAP was still defined, and mod_rewrite.dsp
continued to define NO_DBM_REWRITEMAP

Reported by:          Jerry Baker <jerrybaker@attbi.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96483 13f79535-47bb-0310-9956-ffa450edef68
2002-08-22 11:23:26 +00:00
Jeff Trawick
c14aa6528b Change mod_rewrite to use apr-util's dbm support for dbm rewrite
maps.

For now, the SDBM dbm flavor is always used.  It won't be compatible
with dbm rewrite maps built for Apache 1.3 until apr-util supports
ndbm and mod_rewrite is changed to prefer ndbm over the built-in
sdbm.

PR:         10644


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96478 13f79535-47bb-0310-9956-ffa450edef68
2002-08-21 19:47:15 +00:00
Cliff Woolley
951ffb24ac Fix a problem whereby RewriteMap prg:'s would get out of sync due to
the inappropriate use of nonblocking reads.  Also get rid of the stderr
altogether since mod_rewrite never uses it.

PR: 9534


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96475 13f79535-47bb-0310-9956-ffa450edef68
2002-08-21 17:49:18 +00:00
Ian Holsman
dd2ac7d1c8 new configuration option for mod_rewrite to set cookies.
configuration is like the following

RewriteRule (.*) - [CO=<cookiename>:$1:<domain>:<expiry in minutes>]

Submitted by:	Brian Degenhardt <bmd@mp3.com>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95840 13f79535-47bb-0310-9956-ffa450edef68
2002-06-22 03:36:57 +00:00
Ryan Bloom
ce21065393 Tokenize the arguments for rewrite programs during config parsing, and
just use that information later.  I was having a problem with prg
directives with arguments failing the configuration.  The problem was
a call to stat, which was being passed the program name and the arguments.
Obviously, the arguments were messing up the call to stat.  This gets the
test suite working for me again.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95372 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 00:02:59 +00:00
Cliff Woolley
90c19bdbd1 Error out a bit more nicely if the RewriteMap prg: is not found. We
can't just apr_stat in the first init round because we haven't run
apr_tokenize_to_argv() yet, and it would be a relatively ugly hack to run
it twice just for that.  Well, I suppose we could store the argv in the
rewritemap structure, but ... nah.  With this, we shutdown (cleanly, as
opposed to the old exit(1) method) if we go to execute a rewritemap
and discover it doesn't exist, and log a nice descriptive message at the
end of the error_log.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95337 13f79535-47bb-0310-9956-ffa450edef68
2002-05-29 04:38:59 +00:00
Aaron Bannert
28ef5dd641 Fix mod_rewrite hang when APR uses SysV Semaphores. Before we were
silently failing when locking/unlocking the mutex, since httpd
child processes didn't have permissions to access the root-created
semaphore.

PR: 8143


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94969 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 18:24:03 +00:00
Cliff Woolley
e80327a02e Added an optional function (ap_register_rewrite_mapfunc) which allows
third-party modules to extend mod_rewrite's "int:" internal RewriteMap
functionality.

Concept by:  Tahiry Ramanamampanoharana <nomentsoa@hotmail.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94939 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 03:10:24 +00:00
Aaron Bannert
1e8b1a0dbc Update mod_rewrite to use the new APR global mutex type.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94465 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 20:01:20 +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
Ian Holsman
86b792b21c Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully

PR:
Obtained from:
Submitted by:
Reviewed by:	(Idea only Jeff Trawick)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 16:35:22 +00:00
Aaron Bannert
b77471f71c Convert mod_rewrite's INTRAPROCESS lock to the newly supported
apr_thread_mutex_t type lock. Passes all rewrite.t tests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91941 13f79535-47bb-0310-9956-ffa450edef68
2001-11-14 08:03:18 +00:00
William A. Rowe Jr
9234f5368e Thread saftey lock for mod_rewrite's cache... I'm sure others will have
some 'better ideas' but this will work for now.

Submitted by: Brian Pane <bpane@pacbell.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91612 13f79535-47bb-0310-9956-ffa450edef68
2001-10-21 01:24:35 +00:00
Ken Coar
2b54256b59 Bring forward the NOESCAPE flag from 1.3..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89158 13f79535-47bb-0310-9956-ffa450edef68
2001-05-18 18:38:42 +00:00
Jeff Trawick
01dd97bd88 Fix some APR-ization issues:
1) we're using an apr_time_t file mtime, but trying to fit it in
   a time_t entry in the cache and in parameters to the cache
   access routines; use apr_time_t everywhere

2) we need to use apr_fileperms_t instead of mode_t for APR
   file permissions

PR:		6980


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88443 13f79535-47bb-0310-9956-ffa450edef68
2001-03-03 01:46:16 +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
bb282b75f7 Clean up some of the includes:
- explicitly include apr_lib.h since ap_config.h doesn't
- use apr_want.h where possible
- use APR_HAVE_ where possible
- remove some unneeded includes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 13:05:29 +00:00
Greg Stein
faf8ec67da http_conf_globals.h is gone
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88059 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 12:13:26 +00:00
Tony Finch
9ea289f20a Bring forward from 1.3:
I broke mod_rewrite by modifying strings in place when expanding them,
because variable lookups can cause subrequests which cause mod_rewrite
to do its stuff again including an expansion on the same string, which
is then syntactically invalid. So copy the lookup keys somewhere else
before using them in such a way that may cause recursion.

In addition to this, my parser could also be confused by complicated
nested rewrite map expansions like ${map1:${map2:key|dflt}|dflt} so
fix that too by keeping track of {} when looking for |.

PR:             7087


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87723 13f79535-47bb-0310-9956-ffa450edef68
2001-01-18 22:36:58 +00:00
Tony Finch
edddcdeda0 Restore functionality broken by the mod_rewrite security fix:
rewrite map lookup keys and default values are now expanded
so that the lookup can depend on the requested URI etc.

Because the new code is recursive you can now write configurations
like the following (with nested map lookups) which wasn't directly
possible before -- you had to use a RewriteCond and a %N backref
instead, as in http://www.apache.org/docs/vhosts/mass.html#xtra-conf

RewriteMap tolower int:tolower
RewriteMap host2user txt:/home/www/conf/virtusertbl
RewriteRule /(.*) /home/${host2user:${tolower:%{HTTP_HOST}}|www}/public_html

PR: 6671


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86638 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 04:50:25 +00:00
Tony Finch
11149ed807 Fix a security problem that affects certain configurations of mod_rewrite.
If the result of a RewriteRule is a filename that contains expansion
specifiers, especially regexp backreferences $0..$9 and %0..%9, then it
may be possible for an attacker to access any file on the web server.
The fix replaces a multi-pass string expander with a one-pass expander,
and includes the code quality improvements that were committed separately
to 1.3.

Message-Id: <E13OQB5-0004Xs-00@hand.dotat.at>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86302 13f79535-47bb-0310-9956-ffa450edef68
2000-09-23 00:05:45 +00:00
Jeff Trawick
74dd3ddc14 Fix some bad calls to ap_log_rerror() in mod_rewrite. In some places,
errno was passed as the APR error code.  In other places, 0 was passed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86124 13f79535-47bb-0310-9956-ffa450edef68
2000-08-21 19:09:01 +00:00
Jeff Trawick
03585c8240 Clean up maintainer-mode compiles of mod_rewrite (use AP_INIT_xx macros
and clean up resulting warnings).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85980 13f79535-47bb-0310-9956-ffa450edef68
2000-08-03 03:09:32 +00:00
Doug MacEachern
059d8dd212 prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85976 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 05:27:38 +00:00
Ryan Bloom
0207f837c4 Apache doesn't actually check for stdarg.h, but APR does. Just use the
APR defined APR_HAVE_STDARG_H to check for the existance of stdarg.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85833 13f79535-47bb-0310-9956-ffa450edef68
2000-07-13 16:26:47 +00:00
Ryan Bloom
750d8cc03c Protect system header files with the appropriate macros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85558 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 23:03:05 +00:00
Ryan Bloom
580852da85 Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85553 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:47:17 +00:00
Ryan Bloom
e6d6a8d197 Missed one sys/stat.h in mod_rewrite.h. Removing it now.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85536 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 15:43:10 +00:00
Doug MacEachern
2f45db7e82 back out APR_ prefix for TRUE,FALSE
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85081 13f79535-47bb-0310-9956-ffa450edef68
2000-04-28 18:27:55 +00:00
Doug MacEachern
f3a4cf49be prefix TRUE,FALSE with APR_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85074 13f79535-47bb-0310-9956-ffa450edef68
2000-04-28 06:49:53 +00:00
Ryan Bloom
de3a77dc01 Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84963 13f79535-47bb-0310-9956-ffa450edef68
2000-04-14 15:59:20 +00:00
Roy T. Fielding
2bee4ad19d Update to Apache Software License version 1.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84879 13f79535-47bb-0310-9956-ffa450edef68
2000-03-31 09:05:25 +00:00