1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

408 Commits

Author SHA1 Message Date
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
Jeff Trawick
2030234ca7 eliminate unused variables
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94152 13f79535-47bb-0310-9956-ffa450edef68
2002-03-24 02:55:35 +00:00
Brian Pane
804f94d21f Changed mod_cgi to not do single-byte reads to consume the
script headers


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94151 13f79535-47bb-0310-9956-ffa450edef68
2002-03-23 23:19:41 +00:00
Jeff Trawick
161365781c eliminate an unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94146 13f79535-47bb-0310-9956-ffa450edef68
2002-03-23 13:06:30 +00:00
Brian Pane
0adefd4831 Eliminate an 8KB buffer from the stack in mod_info's handler function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94145 13f79535-47bb-0310-9956-ffa450edef68
2002-03-23 06:03:37 +00:00
William A. Rowe Jr
e8dd037868 An error is an error. Since we replace the message with 'failed to
invoke command; ...' we aught to log it at the right level.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94122 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 06:51:52 +00:00
William A. Rowe Jr
3105b7eaa1 Trace the invoked command when we use CreateProcess()-style emulation
of execxx() for apr_proc_create().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94119 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 06:09:39 +00:00
Jeff Trawick
e410111205 Fix a mod_cgid problem that left daemon processes stranded
in some server restart scenarios.

It relied on getting SIGHUP to die, but it wasn't careful
about establishing the SIGHUP handling it needed so after
apachectl restart, SIGHUP was ignored since the new cgid
daemon process inherited a signal(SIGHUP,SIG_IGN) done by
the MPM during its restart logic.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94116 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 02:56:56 +00:00
William A. Rowe Jr
5f469e7815 Now-meaningless-commentary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94071 13f79535-47bb-0310-9956-ffa450edef68
2002-03-21 05:28:48 +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
Jeff Trawick
5f8b426d1d Get nph- CGI scripts working again by avoiding filters that can't
possibly deal with a script that generates the protocol header.

PR:       8902, 8907, 9983


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94052 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 13:57:08 +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
Jeff Trawick
f4a27d9935 fix a compile error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93976 13f79535-47bb-0310-9956-ffa450edef68
2002-03-17 01:36:30 +00:00
William A. Rowe Jr
d07e31f81f Simplify s/APR_OS_PROC_T_FMT/APR_PID_T_FMT/, apr_os_foo entities aren't
for external consumption.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93969 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:42:46 +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
5ae24550fc speed up the short_report path... we were unnecessarily
walking the scoreboard

Submitted by:	Stas Bekman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93955 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 15:30:22 +00:00
Jeff Trawick
8a5b90c365 Factor out a bunch of commonality between the HAVE_TIMES path and
the !HAVE_TIMES path.  This will help avoid future errors similar
to the ones fixed earlier today.

The code change also has the benefit of getting the paren-matching
feature of some editors to work properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93954 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 15:16:27 +00:00
Jeff Trawick
d403a74533 fix a couple of formatting bugs in the !HAVE_TIMES path
(somebody forgot to convert floating point format to
long integer format when APR-izing the time)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93951 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 12:40:39 +00:00
Jeff Trawick
f3084243f2 make mod_status a little faster by checking for an active server sooner in
the main loop

clean up the main loop by continuing when the server isn't active instead
of introducing yet another level of nesting


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93950 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 12:04: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
Jeff Trawick
ea0096097b zap some crufty NO_GETTIMEOFDAY code
Submitted by:       Stas Bekman
Reviewed by:        Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93902 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 13:08:49 +00:00
Jeff Trawick
5baa83e59f fix the calculation of request time in mod_status
(currently nobody sets the start/stop times so this fix isn't
immediately apparent)

Submitted by:    Stas Bekman
Reviewed by:     Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93901 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 12:40:59 +00:00
Jeff Trawick
b787e06078 add a bit of error checking to the mod_cgid daemon's logic to read
the request over the unix socket

it isn't perfect (EINTR, partial reads) but it is good enough to
avoid segfaulting if some code tries to verify that cgid is active
by connecting to its unix socket


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93790 13f79535-47bb-0310-9956-ffa450edef68
2002-03-08 13:46:36 +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
Justin Erenkrantz
31eaa061ce The style police at work.
(Justin took a minor pass at this on top of Sander's patch.)

Submitted by:	Sander Striker <striker@apache.org>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93695 13f79535-47bb-0310-9956-ffa450edef68
2002-03-04 10:46:22 +00:00
Bradley Nicholes
e6d10bff2d Switching from a project build file to GNU make files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93665 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 22:21:25 +00:00
William A. Rowe Jr
b494547e8a next_filter of NULL to any ap_sub_req_lookup*() fn implies the subreq
will never be run - or we expect to pass the subreq to fast_redirect.
  The comming fix will break invalid ap_sub_req_lookups* expecting to
  run subrequests with the next_filter NULL semantic.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93663 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 20:44:20 +00:00
Bill Stoddard
02d9c8800b De-tabify...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93603 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 18:57:26 +00:00
Bill Stoddard
b1e828a3bf This fixes a bug in mod_status on Windows where restart time was not
properly initialized.

Move ap_restart_time into the scoreboard global area so the child process
on non-forking platforms can have access to it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93502 13f79535-47bb-0310-9956-ffa450edef68
2002-02-19 21:09:27 +00:00
Justin Erenkrantz
1b1337e4df Fixup DEBUG_CGI code paths to compile and not leak fds.
PR: 9670, 9671
Submitted by:   David MacKenzie <djm@pix.net>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93474 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 06:15:38 +00:00
Justin Erenkrantz
4b72cda81a Correctly check script_in variable.
(script_out and script_err are already correct.)
PR: 9669


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93468 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 03:31:27 +00:00
Aaron Bannert
5700c79bc2 Fix other_child logic that would cause the mod_cgid process not
to properly die when the parent process shuts down.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93404 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 02:49:07 +00:00
Justin Erenkrantz
00ad366b42 That check is superfluous since we must have savename defined
(otherwise, we'd get APR_INCOMPLETE on apr_dir_read).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93330 13f79535-47bb-0310-9956-ffa450edef68
2002-02-07 06:50:52 +00:00
Justin Erenkrantz
795f15723d Allow mod_autoindex to serve symlinks if permitted and optimize our stats
so that only one stat() is needed.

If we get APR_FINFO_MIN bits, lookup_dirent won't do a repeated stat()
call.  So, let's do it here.  Also, if we see a symlink, expand it.
(Technically, we don't *have* to expand the symlinks - the resolve_symlink
fix handles that, but we can't really assume that.)  Since we know that
dirent will be rr->finfo anyway, go back to relying on dirent only for
APR_DIR checks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93329 13f79535-47bb-0310-9956-ffa450edef68
2002-02-07 06:37:09 +00:00
Cliff Woolley
e2b7e4bd89 Vetoed by Ken
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93256 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 15:35:54 +00:00
Cliff Woolley
87e7dd20a9 List files that would result in HTTP_UNAUTHORIZED in addition to
successes and redirections, since there's a chance the client will
actually have the proper authorization to retrieve them.

Reported by:	Stas Bekman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93250 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 09:26:02 +00:00
Greg Ames
6cbb3ef98e vetoing and backing out OtherBill's patch rev 1.91. This breaks
mod_autoindex on systems such as Unix where apr_dir_read doesn't automatically
return the filetype.  You see a '?' icon rather than a folder icon
for directories on 2.0.31 because mod_autoindex doesn't realize that the thing
is a directory.

No, we don't want more stat()s either.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93232 13f79535-47bb-0310-9956-ffa450edef68
2002-02-04 21:19:08 +00:00
Jeff Trawick
556b417899 mod_cgid: Add retry logic for when the daemon can't fork fast
enough to keep up with new requests.  Start using
HTTP_SERVER_UNAVAILABLE instead of HTTP_INTERNAL_SERVER_ERROR
when we can't talk to the daemon.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93170 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 22:08:34 +00:00
Jeff Trawick
342daeedc6 Fix some unix socket descriptor leaks in the handler side of
mod_cgid (the part that runs in the server process).  Whack a
silly "close(-1)" in the handler too.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93060 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 18:30:07 +00:00
William A. Rowe Jr
011c7375e9 Which PR? I can't count them all. Get QUERY_STRING and PATH_INFO
working again.  Also rounds out our fix to work around negotiated
  directories which Greg Ames fixed; this addition in request.c simply
  shortcuts all further processing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93045 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 07:44:07 +00:00
William A. Rowe Jr
aff1454d34 *) Split all Win32 modules [excluding the core components mod_core,
mod_so, mod_win32 and the winnt mpm] into individual loadable
     modules, so the administrator may individually disable the former
     compiled-in modules by simply commenting out their LoadModule
     directives.  [William Rowe]

  *) Saved Win32 module authors and porters many future headaches, by
     duplicating the appropriate .h files such as os.h into the include
     directory, including in the build tree.  [William Rowe]

  Also noticed that version stamp resources weren't generated for proxy
  modules, this too is now fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92804 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 08:47:23 +00:00
William A. Rowe Jr
7e1113f913 This patch eliminated from the _SHARED_ segment of the scoreboard all
pointer math.  This is required for portable scoreboards.

  vhost becomes the 'vhost name string' so it now survives ap_generation
  clicks.  next was apparently never used.

  This patch also accounts for the changes to the apr_shm api, and gives
  Win32 the magic of a shared scoreboard.

  Breakage aplenty on non-win32 platforms, I suspect, but this radical
  surgery, and culling of unused functions, was really, really needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92791 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 00:28:00 +00:00
Ryan Bloom
a14a4f5b66 Add the ability to pass flags to both apr_file_open and apr_mktemp.
The reason for this, is that it is very possible to want a temp
file that isn't deleted when the file is closed. It also makes sense
to have the flags in the apr_file_t if possible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92766 13f79535-47bb-0310-9956-ffa450edef68
2002-01-08 06:26:10 +00:00
William A. Rowe Jr
453e7e7c54 Ever tried to extract some value of QUERY_STRING from within SSI?
Now you can :)  Provides $0..$9 results for any regex evaluation,
  and strengthens the expr parser for regex expressions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92676 13f79535-47bb-0310-9956-ffa450edef68
2001-12-31 05:58:59 +00:00
William A. Rowe Jr
f2ec300d52 This otherwise ineffectual patch allows modules to perform internal
redirects of dirs into other resources, while still treating such a
  resource as a dir, based on the original apr_dir_read results.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92638 13f79535-47bb-0310-9956-ffa450edef68
2001-12-28 17:07:33 +00:00
Aaron Bannert
8a1532ee10 Get rid of identifiers called 'stat' so we don't conflict with the libc
'stat' symbol.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92625 13f79535-47bb-0310-9956-ffa450edef68
2001-12-27 18:12:15 +00:00
Aaron Bannert
0e12928c3c Just style changes. Really just 's/\t/ /' since the tabstop alignment
was pretty good. Added a couple braces and spaces here and there.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92624 13f79535-47bb-0310-9956-ffa450edef68
2001-12-27 18:07:22 +00:00
Cliff Woolley
436ecd5553 Related to Brian's commit to fix the XXX comments I'd added a while back.
These lines were broken too, I just hadn't commented them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92609 13f79535-47bb-0310-9956-ffa450edef68
2001-12-26 17:31:48 +00:00
Brian Pane
5287c6ea9e Fixed calculation of bucket lengths
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92601 13f79535-47bb-0310-9956-ffa450edef68
2001-12-26 08:58:55 +00:00