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

336 Commits

Author SHA1 Message Date
André Malo
4bba29a962 allow RewriteEngine Off even if Options -FollowSymlinks is set.
PR: 12395
Reviewed by: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98122 13f79535-47bb-0310-9956-ffa450edef68
2002-12-29 01:46:46 +00:00
Jeff Trawick
8f946ccdc8 Fix a bug with dbm rewrite maps which caused the wrong value to
be used when the key was not found in the dbm.

apr_dbm_fetch() returns APR_SUCCESS as long as there was no I/O
error.  mod_rewrite needed to look further to see if the key
was actually found.

PR 13204


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97106 13f79535-47bb-0310-9956-ffa450edef68
2002-10-04 16:57:38 +00:00
Justin Erenkrantz
6a2b11ae6e The style police just get really annoyed with this file in general.
(No code changes)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96585 13f79535-47bb-0310-9956-ffa450edef68
2002-08-30 04:47:57 +00:00
Jeff Trawick
345b9bf855 fix a type mismatch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96583 13f79535-47bb-0310-9956-ffa450edef68
2002-08-30 01:06:14 +00:00
Ian Holsman
da6a8884aa new option 'path' to the cookie
PR: 12172

Submitted by: apachecvslog@robcromwell.com (Rob Cromwell)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96581 13f79535-47bb-0310-9956-ffa450edef68
2002-08-29 23:14:52 +00:00
Ian Holsman
2ddfc425e5 just saw this bug
PR: 12181


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96579 13f79535-47bb-0310-9956-ffa450edef68
2002-08-29 22:58:52 +00:00
Ian Holsman
a7d7da0fcf shot in the arm by the style police while trying to escape
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96578 13f79535-47bb-0310-9956-ffa450edef68
2002-08-29 22:51:40 +00:00
Ian Holsman
0eb174ae52 set expiry time correctly.
set Cookie on err_headers_out, and ensure it is only set once.

PR: 12132
Submitted by:	apachecvslog@robcromwell.com (Rob Cromwell)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96577 13f79535-47bb-0310-9956-ffa450edef68
2002-08-29 22:45:13 +00:00
Jeff Trawick
c9f89b721a fix breakage of dbm maps which was introduced in the previous commit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96502 13f79535-47bb-0310-9956-ffa450edef68
2002-08-23 18:51:44 +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
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
Victor J. Orlikowski
d982829aa1 Continue the Bill Rowe apr_size_t crusade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95993 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 06:01:14 +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
Jeff Trawick
20881b2fa0 Fix some casting in mod_rewrite which broke random maps.
PR:           9770
Submitted by: Allan Edwards, Greg Ames, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95611 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 14:43:04 +00:00
William A. Rowe Jr
178e10e3da Well the wrappers work out well... nice to be able to put off committing
these API changes until the evening ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95587 13f79535-47bb-0310-9956-ffa450edef68
2002-06-09 03:44:03 +00:00
Cliff Woolley
8ad4ce4d76 Thanks Ryan for cleaning up after my laziness. :) Here are just a few
last little changes.  ->datafile should be initialized... but doing so
brings up the fact that the check in run_rewritemap_programs() was
expecting ->datafile to have a string attached to it.  For clarity,
let's just use argv[0] there.  And since we've reinstated the use of
->checkfile, we no longer need that extra apr_stat() I hacked in,
so let's get rid of it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95375 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 00:35:25 +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
Cliff Woolley
70d8c575a4 Fix RewriteMap prg:'s that have command-line args.
PR: 8464
Submitted by: James Tait <JTait@wyrddreams.demon.co.uk>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95334 13f79535-47bb-0310-9956-ffa450edef68
2002-05-29 03:27:01 +00:00
Cliff Woolley
95c5d1bfd1 propagate gregames' change to the other callers of that function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95189 13f79535-47bb-0310-9956-ffa450edef68
2002-05-20 18:33:41 +00:00
Greg Ames
31e25d29fe don't try to set permissions on the rewrite_log_lock unless it is a SysV
sem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95188 13f79535-47bb-0310-9956-ffa450edef68
2002-05-20 18:13:14 +00:00
Jeff Trawick
50bac91072 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95150 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:24:17 +00:00
Justin Erenkrantz
d60a704bfe It isn't a fatal condition if there is no lockfile name, so switch from
APR_EINVAL to APR_SUCCESS.  (rewritelock_remove already returns SUCCESS in
this case.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94981 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 22:59:56 +00:00
Aaron Bannert
7713016316 Protect us from this dirty hack that gets SysV Sem working again
on mod_rewrite. This, along with the original usage of a unix-only
function in mod_rewrite, is a temporary stopgap measure designed only
to workaround limitations in APR's handling of permission attributes.
It shall be removed as soon as that interface is improved.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94972 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 21:00:50 +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
Aaron Bannert
00d5972391 Add some error checking in mod_rewrite for the mutex lock/unlock calls.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94967 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 18:04:53 +00:00
Jeff Trawick
7b4023ab2c fix the type of the pointer returned by the hash lookup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94961 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 14:02:50 +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
Sander Striker
71f960866f Update for APR rename of apr_get_groupname to apr_group_name_get.
Submitted by: Thom May <thom@planetarytramp.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94752 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 10:27:01 +00:00
Sander Striker
6e8efec657 Adapt to the rename of apr_explode_localtime to apr_time_exp_lt in APR.
Submitted by: Thom May <thom@planetarytramp.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94631 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 12:02:38 +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
Bill Stoddard
d5c24720dc Commit 1 of 2 to:
1. rename ap_rset_content_type to ap_set_content_type
2. reverse the arguments on the call to aligh with ap_set_content_length


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94056 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 17:41:55 +00:00
Bill Stoddard
470edb9dd8 First commit to introduce accessor function to set r->content_type..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94027 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 01:58:47 +00:00
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Jeff Trawick
2df1a02f72 deal with the rename of kill_after_timeout to APR_KILL_AFTER_TIMEOUT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93940 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 22:19:14 +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
da35725071 apr-utils rename apr_ansi_time_to_apr_time and
apr_exploded_time_t.

PR:
Obtained from:
Submitted by:	Thom May <thom@planetarytramp.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93733 13f79535-47bb-0310-9956-ffa450edef68
2002-03-06 17:55:38 +00:00
William A. Rowe Jr
402a038805 Whoh boy that's rough... We sometimes like to answer SIGHUP in the
parent process, don't we?

  This -was- post-fork() in 1.3, but with the massive restructuring,
  we inadvertantly now whack the parent process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93587 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 03:52:20 +00:00
Brian Pane
365a01fe4e Updated the mapper lock to use apr_global_mutex_t instead
of apr_proc_mutex_t


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93467 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 01:31:56 +00:00
Brian Pane
7ae884c5ee Converted the rewrite mapper lock to the new lock API
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93445 13f79535-47bb-0310-9956-ffa450edef68
2002-02-16 21:57:17 +00:00
Jeff Trawick
20778bd6f0 const is nice
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93073 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 12:30:52 +00:00
Martin Kraemer
82684e7331 No need to use strcpy() where a ptr assignment is ok
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93072 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 09:09:47 +00:00
Jeff Trawick
d78de7dc76 Fix a segfault in mod_rewrite's logging code caused by passing the
wrong config to ap_get_remote_host().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92827 13f79535-47bb-0310-9956-ffa450edef68
2002-01-11 13:38:28 +00:00
Bradley Nicholes
3356d10c5b Code updates to allow Mod_Rewrite and Mod_Auth_DBM to build on NetWare
Submitted by: G�nter Knauf <gk@gknw.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92775 13f79535-47bb-0310-9956-ffa450edef68
2002-01-08 21:16:08 +00:00
Jeff Trawick
57b42f96ac handle the disappearance of apr_lock_create_np() and
apr_proc_mutex_create_np() and the new parameter to
apr_lock_create() and apr_proc_mutex_create()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92653 13f79535-47bb-0310-9956-ffa450edef68
2001-12-29 23:16:24 +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
Ken Coar
06243788dd Typo fixit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92033 13f79535-47bb-0310-9956-ffa450edef68
2001-11-19 15:27:39 +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
Aaron Bannert
3e59c439e3 Convert tabs to spaces, and a couple other style changes. No functional
changes. I checked with the rewrite.t perl-framework test to make sure
it still passes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91940 13f79535-47bb-0310-9956-ffa450edef68
2001-11-14 07:50:00 +00:00