1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-25 07:01:39 +03:00
Commit Graph

71 Commits

Author SHA1 Message Date
Paul J. Reder
ef6c5b6076 Moved the call to apr_mmap_dup outside the error branch so
that it would actually get called. This fixes a core dump
 at init everytime you use the MMapFile directive. [Paul J. Reder]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94721 13f79535-47bb-0310-9956-ffa450edef68
2002-04-19 19:16:23 +00:00
Cliff Woolley
3e2ce19baf BUCKET FREELISTS
Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 08:17:26 +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
d7c6f23395 make sure we set rc before referencing it
use a somewhat better warning message for a failure of
ap_server_relative_root()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93962 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 20:43:03 +00:00
William A. Rowe Jr
feaf0b8072 Another potential ap_server_root_relative failure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93959 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 16:59:51 +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
Cliff Woolley
2cb065d1cf It's better to dup the apr_mmap_t when we first create it. The result
is the same, and it saves us a call to apr_mmap_dup() per request.

Reviewed by:	Brian Pane (concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92139 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 22:44:30 +00:00
Ian Holsman
f13fbbaa70 let mod_file_cache use the new apr_mmap_dup function
Submitted by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92092 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 17:01:42 +00:00
Ryan Bloom
6e932b2870 Fix the new method code. We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 04:04:13 +00:00
William A. Rowe Jr
c0dbe65816 Need some context for the iterator! Finally get to use that accessor :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89866 13f79535-47bb-0310-9956-ffa450edef68
2001-08-02 00:17:45 +00:00
William A. Rowe Jr
f8bc89dd50 Provide some cast safety tests and close the _last_ of the build errors
report (at -w3) by Win32 in the server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89830 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 16:34:14 +00:00
William A. Rowe Jr
7b2c62a74e Changes to respect the new apr bucket and brigade length types (either
apr_size_t for bucket lengths, or apr_off_t for aggregate brigade lengths.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89683 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 20:38:01 +00:00
William A. Rowe Jr
1501c81198 Remove last public vestigages of APR_INHERIT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89600 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 19:41:20 +00:00
William A. Rowe Jr
1fa29a8d2d Obvious files that need inheritance, correct me if I'm wrong.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89561 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 21:07:40 +00:00
Cliff Woolley
29212e8c6b *) Account for the new pool parameter to apr_bucket_file_create()
and apr_bucket_file_make().

*) Simplify mod_file_cache's sendfile_handler by taking advantage
   the new ability of file buckets to handle files opened in XTHREAD
   mode.  [Also inlined some of the brigade construction stuff in
   mod_file_cache's handlers to save a palloc() or two.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89438 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:18:09 +00:00
William A. Rowe Jr
e6bb83641f Filenames aught to be normalized to the serverroot, and server_root_relative
already canonicalizes names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89382 13f79535-47bb-0310-9956-ffa450edef68
2001-06-18 05:39:10 +00:00
Bill Stoddard
c13afe3fd5 Do not send apr_file_t allocated out of the pconf pool down the
filter chain.  This is not perfect but better. Need to do some
more work in apr_os_file_put to initialize fields a bit better.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89086 13f79535-47bb-0310-9956-ffa450edef68
2001-05-11 17:34:17 +00:00
Jeff Trawick
aa532ee243 Get mod_file_cache to refuse to compile on systems with neither
sendfile nor mmap.

Get mod_file_cache to compile on systems with sendfile but !mmap.

Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88623 13f79535-47bb-0310-9956-ffa450edef68
2001-03-31 11:51:16 +00:00
Jeff Trawick
808ca404c6 get rid of an unused variabe in file_cache_xlat()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88591 13f79535-47bb-0310-9956-ffa450edef68
2001-03-26 23:40:41 +00:00
Jeff Trawick
16a82e270b Get mod_file_cache to compile again on platforms with no apr_sendfile().
Get the Tru64 compiler to shut up about an incompatibility between void **
and struct **.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88589 13f79535-47bb-0310-9956-ffa450edef68
2001-03-26 19:11:09 +00:00
Bill Stoddard
b951f8b0c7 Eat our own cooking. Cleanup code paths and use apr_hash functions. Good
for a small performance boost.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88586 13f79535-47bb-0310-9956-ffa450edef68
2001-03-26 18:01:17 +00:00
William A. Rowe Jr
16231360f1 Goodbye ap_send_http_header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88390 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 15:24:09 +00:00
Jeff Trawick
e26706be5c use the right fmt string for finfo.size
Submitted by:	Greg Stein and gcc on FreeBSD


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88309 13f79535-47bb-0310-9956-ffa450edef68
2001-02-25 00:38:17 +00:00
Bill Stoddard
1db0d496ec Modify mod_file_cache to save pre-formatted strings for
content-length and last-modified headers for performance.

Submitted by:  Mike Abbot <mja@trudge.engr.sgi.com>
Reviewed by: Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88292 13f79535-47bb-0310-9956-ffa450edef68
2001-02-23 18:57:36 +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
7f4a5fe7f5 Use the appropriate APR_FINFO_flags for the apr_stat/lstat/getfileinfo
calls to avoid ownership and permissions on Win32 when they are not
  required, and until they are implemented.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87873 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 21:28:28 +00:00
William A. Rowe Jr
cd1ef027c2 The changes required for the APR_FINFO_wanted argument to
apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
  are simply the required changes to get the server working.
  The size of the patch is a warning about how we need to
  really look at what we are trying to accomplish with all
  of these stat/lstat calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87760 13f79535-47bb-0310-9956-ffa450edef68
2001-01-20 21:42:23 +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
Jeff Trawick
9a73c1fca8 get rid of an unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87658 13f79535-47bb-0310-9956-ffa450edef68
2001-01-11 20:14:04 +00:00
Bill Stoddard
d88b08d746 It is not sufficient to reset the file pointer before each call to ap_send_fd. A better solution
is to make certain that only apr_sendfile() will be used to send content with a cached file handle.
This assumes that apr_sendfile() should not rely on the position of the file pointer. I suspect that
sendfile implementations that rely on the position of the file pointer are broken and we should not
use sendfile on those platforms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87654 13f79535-47bb-0310-9956-ffa450edef68
2001-01-11 18:50:09 +00:00
Allan K. Edwards
06c2846624 use AP_HOOK_LAST for this module. This may or may not be the final
solution but it is at least more correct.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87634 13f79535-47bb-0310-9956-ffa450edef68
2001-01-09 21:38:35 +00:00
Doug MacEachern
55e9bcf8e7 use ap_strcmp_match and fix pattern typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87618 13f79535-47bb-0310-9956-ffa450edef68
2001-01-09 00:08:13 +00:00
Doug MacEachern
40391fb9f2 adjust remaining modules to use the new handler hook method (Alan Edwards)
bring back the old handler prototype by reusing r->handler (dougm)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87617 13f79535-47bb-0310-9956-ffa450edef68
2001-01-08 23:55:12 +00:00
Jeff Trawick
78309d6d21 Get rid of the once_through flag. It is never used and doesn't work
in DSO mode anyway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87329 13f79535-47bb-0310-9956-ffa450edef68
2000-12-13 13:22:51 +00:00
Ryan Bloom
1e453f2369 Port httpd to the newest MMAP api.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87243 13f79535-47bb-0310-9956-ffa450edef68
2000-12-07 05:01:01 +00:00
Jeff Trawick
8662bacbc4 When caching file handles (vs. mmaps) reset the file pointer
before serving, since a filter may have caused the file pointer
to advance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86876 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 23:07:32 +00:00
Jeff Trawick
5d452728e4 Remove the byterange code out of mod_file_cache's handler. That
is completely in the core now.

Note that file handle caching is broken (nothing to do with
byte ranges).  mmap caches seem to work o.k.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86873 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 19:07:34 +00:00
Greg Stein
9904e8589a ap_set_content_length() now has a void return.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86863 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 03:12:58 +00:00
Jeff Trawick
f076d872e4 Avoid warning about unused function open_file() on systems
with no sendfile().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86859 13f79535-47bb-0310-9956-ffa450edef68
2000-11-07 22:12:36 +00:00
William A. Rowe Jr
d6490633eb Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 06:05:15 +00:00
Jeff Trawick
25fb26a452 Fix some bad calls to ap_log_error(); some of these neglected to
turn on APLOG_NOERRNO even though no syscall failure was being
reported; others passed errno instead of the APR retcode.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86378 13f79535-47bb-0310-9956-ffa450edef68
2000-10-03 21:48:31 +00:00
Jeff Trawick
07cb423648 The previous commit pointed out an unfortunate problem with the
ap_os_case_canonical_filename() interface: It returns const char * on
platforms where no mapping is ever performed but char * on platforms
where mapping can occur.  Such a discrepancy seems to be a good choice,
as no platform is penalized with extra pathlength.

This tweak gets rid of a const misuse warning on systems where
ap_os_case_canonical_filename() returns const char *.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86376 13f79535-47bb-0310-9956-ffa450edef68
2000-10-03 15:05:26 +00:00
William A. Rowe Jr
ceedcbda2f Definately need a canonical name, so comparison succeeds at run time.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86375 13f79535-47bb-0310-9956-ffa450edef68
2000-10-03 13:11:25 +00:00
Bill Stoddard
bb4706d2eb Let ap_send_fd handle the error logging to eliminate duplicate error log entries.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86080 13f79535-47bb-0310-9956-ffa450edef68
2000-08-15 12:54:08 +00:00
Bill Stoddard
00e5a6559a Remove the sendfile_handler (was #if 0'ed out) that does the buffer hi-jack
trick in order to send the headers out on the sendfile call. Besides, BUFF is
going away with brigades and filters...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86079 13f79535-47bb-0310-9956-ffa450edef68
2000-08-15 12:47:46 +00:00
William A. Rowe Jr
1a9db204f5 Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 06:07:53 +00:00