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

424 Commits

Author SHA1 Message Date
Justin Erenkrantz
924fc33d06 Fix suexec invocations from userdir - the ~ was not being prepended to the
uid per our convention.  Therefore, bad things would happen (like we
wouldn't cd to the right directory).

Add a flag to the ap_unix_identity_t structure to indicate if we are in
a userdir - if so, prefix the ~.

(Modified by Justin, but Colm's patch pointed me in the right direction.)

PR: 7810
Submitted by:	Colm <colmmacc@redbrick.dcu.ie>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94791 13f79535-47bb-0310-9956-ffa450edef68
2002-04-25 07:18:40 +00:00
Cliff Woolley
768d65eeac AcceptPathInfo was totally backwards... it would reject when set to on and
by default and accept when set to off for the default handler, and would
reject only if set to accept for mod_cgi(d) and mod_isapi.

PR: 8234


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94751 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 08:08:38 +00:00
Brian Pane
6b59ee40b9 Skip a potentially heavyweight call to sysconf, plus some
local variable initializations, in the common case where the
request is not for the server status page


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94745 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 04:48:11 +00:00
Bill Stoddard
921846bd03 Failure to fork cgid is a shooting offense.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94743 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 01:36:49 +00:00
Cliff Woolley
2a644fbdb8 Fix HTML 3.2 validation error: &O is not a valid entity. Should be &amp;O
Reported by: validator.w3.org


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94740 13f79535-47bb-0310-9956-ffa450edef68
2002-04-21 19:10:07 +00:00
Cliff Woolley
219a3a1011 Fix mod_autoindex output with SuppressRules turned on.
PR: 8016
Submitted by: David Shane Holden <dpejesh@yahoo.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94739 13f79535-47bb-0310-9956-ffa450edef68
2002-04-21 18:35:26 +00:00
William A. Rowe Jr
e97e2e539c process_cgi is more descriptive than replace_cmd.
It also affects query_string args.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94638 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 20:42:35 +00:00
William A. Rowe Jr
fe28459eb0 Wasted at least 20 minutes reparsing this code till I determined it's
correct.  But make the sucker legible so noone else repeats the experience.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94635 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 19:52:59 +00:00
William A. Rowe Jr
596ccf1b44 In order for Win32 to accept the shebang line of #!perl so we 1) search
the PATH and 2) resolve perl.exe for perl, we must add the progtype so
  we can override APR_PROGRAM with APR_PROGRAM_PATH.  This is the API change
  only for the cgi build command line option function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94634 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 19:50:46 +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
Jeff Trawick
3f3d6de769 move a loop-invariant computation out of the thread loop and
at the same time quiet a gcc warning (it assumed that thread_limit
could be zero, which would leave ps_record uninitialized when
referenced after the end of the thread loop)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94579 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 11:18:41 +00:00
Doug MacEachern
4157e579bf PR:
Obtained from:
Submitted by:   Ryan Morgan <rmorgan@covalent.net>
Reviewed by:	dougm, jimjag
Change mod_status to use scoreboard accessor functions so it can
be used in any MPM without having to be recompiled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94558 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 01:55:44 +00:00
Ryan Bloom
45cb1e8190 This is a HACK! The problem is that the fast_internal_redirect is
removing the OLD_WRITE filter. Obviously that is wrong.  For right now,
the fix is to hack around the problem and just make it work.  Long term,
we need to find a real solution to this, but this gets autoindex working
today.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94457 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 17:50:37 +00:00
Sander Striker
d14107e925 Remove hardcoded paths from MPMs and move them to a more central
place.  Expand paths in httpd-std.conf in a similar fashion as we do
in our headers.

Submitted by:	Pier Fumagalli <pier@betaversion.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94431 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 09:15:44 +00:00
Brian Pane
3e479f646f Removed the single-byte header reads from mod_cgid
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94344 13f79535-47bb-0310-9956-ffa450edef68
2002-03-30 23:55:16 +00:00
Brian Pane
3f381e30d6 Fixed script error logging, which I'd left commented out after making
the changes to use a brigade to read the script headers
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94343 13f79535-47bb-0310-9956-ffa450edef68
2002-03-30 23:11:55 +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
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