1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

231 Commits

Author SHA1 Message Date
Cliff Woolley
5a25f1fe66 style police
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95294 13f79535-47bb-0310-9956-ffa450edef68
2002-05-26 22:56:45 +00:00
Brian Pane
77a5581e2c Fix for suexec invocation of CGIs under user dirs when using cgid
PR: 7810
Submitted by:	Colm MacCarthaigh <colmmacc@redbrick.dcu.ie>
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95292 13f79535-47bb-0310-9956-ffa450edef68
2002-05-26 22:10:55 +00:00
Jeff Trawick
bc0cf18899 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95151 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:33:10 +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
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
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
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
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
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
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
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
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
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
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
William A. Rowe Jr
67c3d93b2c Apply the converse of the AcceptPathInfo patch for isapi's/cgi's.
The default behavior remains, accept PATH_INFO, but it may be expressly
  revoked with AcceptPathInfo Off


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92452 13f79535-47bb-0310-9956-ffa450edef68
2001-12-13 17:22:20 +00:00
Jeff Trawick
179c025421 very minor tweaks:
. convert a comment to English
. zap an unnecessary '.' from a log message
. rearrange the setting of some variables controlling pipes and cmd-type
  in the cgi process so that the differences in their values for ssi vs. cgi
  can be more readily seen


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92177 13f79535-47bb-0310-9956-ffa450edef68
2001-11-26 14:38:03 +00:00
Brian Pane
b3cc1069aa fixed declaration mismatch for cgid_init() that was preventing compilation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92147 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 22:29:09 +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
468199afcb Remove the returned-length "w" parameter from apr_bucket_heap_create()
and apr_bucket_heap_make().  It was useless, since the length is invariant
from the length passed in and from the resulting bucket's b->length.  This
takes care of a long-standing issue first brought up in February and
discussed on the dev@apr list.  (Issue #2 from the "Bucket API Cleanup
Issues" thread.)

See http://marc.theaimsgroup.com/?l=apr-dev&m=98324983126666&w=2

Reviewed by:    Ryan Bloom (concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91866 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 03:23:12 +00:00
Ian Holsman
eea38d7c2e This patch changes the apr_table_elts macro so that it provides
access to the internals of an apr_table_t via a const pointer
instead of the current non-const pointer.


Submitted by:	Brian Pane <BPane@pacbell.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91860 13f79535-47bb-0310-9956-ffa450edef68
2001-11-11 22:31:04 +00:00
Justin Erenkrantz
c87b109962 apr_file_gets returns an apr_status_t not a char* and it returns
APR_SUCCESS when it reads something (which is 0).

Two of the cases were doing while apr_file_gets > 0 which would cause
it to loop when it returned APR_EOF.  So, the valid check here is to
loop while we are receiving APR_SUCCESS.

Fix all of the other apr_file_gets to check APR_SUCCESS explicitly so
that it is obvious that we are checking an apr_status_t.  Yes,
0 == APR_SUCCESS, but it obviously wasn't clear to someone what it
was returning.

Submitted by:	Dale Ghent <daleg@elemental.org>,
                Brian Pane <bpane@pacbell.net>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91852 13f79535-47bb-0310-9956-ffa450edef68
2001-11-11 16:48:26 +00:00
Cliff Woolley
81c669c420 Remove unused hard-coded definition of a SHELL_PATH.
Submitted by:	Hiten Pandya <hpandya@lycos.co.uk>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91453 13f79535-47bb-0310-9956-ffa450edef68
2001-10-12 21:39:40 +00:00
Justin Erenkrantz
a8a56e00c5 Switch back to SIGUSR1 for graceful restarts on all platforms that
support it.  This defines a symbol called AP_SIG_GRACEFUL in
ap_config_auto.h which will have the appropriate signal value.  All
direct references to SIGWINCH have been replaced with AP_SIG_GRACEFUL.

On Linux 2.0, use SIGWINCH instead since SIGUSR1 is used by glibc
2.0's user-space threading library to control threads.  All later
versions of Linux/glibc don't have this problem.  (Not to mention the
security holes in older Linux versions which make it unsuitable for
use as a web server.)  If your platform doesn't have SIGUSR1, use the
appropriate mojo in configure to define what your graceful restart
signal should be.

In theory, a configure switch could be added to allow the admin to
specify the appropriate signal that should be used.  This is left
as an exercise to the reader for now.

The docs need to be updated.  Since the signal is now configurable,
just saying SIGUSR1 for graceful restart isn't completely true.  Also,
the apachectl functionality needs to be moved into httpd - this is
what Win32 does and it makes us consistent across platforms.

Roy issued a veto against use of SIGWINCH by default, so this should
resolve that veto.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91076 13f79535-47bb-0310-9956-ffa450edef68
2001-09-18 22:13:59 +00:00
Paul J. Reder
f2e3713193 Moved split_and_pass_pretag_buckets back to being a
macro at Ryans's request. Removed the return from it
by setting and returning a return code instead. Updated
the code to check the return code from teh macro and
do the right thing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90735 13f79535-47bb-0310-9956-ffa450edef68
2001-08-27 20:25:42 +00:00
Jeff Trawick
a1a33b3115 fix what would seem to be a serious problem in
split_and_pass_pretag_buckets(): the retcode is not
specified on one of the paths


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90600 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 00:47:09 +00:00
Jeff Trawick
dc65657589 make it compile :(
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90580 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 20:15:56 +00:00
William A. Rowe Jr
2902f2da92 Optimize out what is a very expensive in-request call to
ap_server_root_relative (and is becoming more expensive).
  Now the call happens in the config phase where it belongs.
  Note someone can hop in and transpose the stat and open
  with an open and getfileinfo if you are a performance hound.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90563 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 18:53:27 +00:00
Paul J. Reder
9067bdbe2b Fix for mod_include. Ryan's patch to check error
codes put a return in the wrong place. Also, the
include handler return code wasn't being checked.
I don't like macros with returns, so I converted
SPLIT_AND_PASS_PRETAG_BUCKETS into a function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90554 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 15:45:49 +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
Jeff Trawick
38f2790116 Fix a restart problem when cgid is used. Code in the parent
httpd process was trying to clear a pool which is now only
initialized in the child.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90048 13f79535-47bb-0310-9956-ffa450edef68
2001-08-09 15:10:58 +00:00
Doug MacEachern
c4fb990e99 plug mod_cgid restart leak
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89959 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 22:32:57 +00:00
William A. Rowe Jr
bb39b51155 Same cleanups as applied to mod_cgi, falling out of scope != destruction
in plain ol' C.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89944 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 18:43:30 +00:00
Bill Stoddard
a685e2a0e8 Be a bit more explicit. If the filetype is not an APR_REG, the fail the request.
This relys on directory_walk having already resolved symboloc links.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89789 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 16:18:05 +00:00
Bill Stoddard
11f28c3d04 Win32: Get exec cgi tag working. finfo.protection == 0 on Windows from the
apr_stat() call in directory walk (because discovering the permissions on
Windows is ridiculously expensive).  All we really need to know is whether the
file exists.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89788 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 15:11:40 +00:00
Jeff Trawick
dfa372f602 don't destroy the pcgi pool when the other-child registration
of the cgi daemon goes away... it goes away *because* the
pcgi pool is being destroyed


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89130 13f79535-47bb-0310-9956-ffa450edef68
2001-05-16 19:19:56 +00:00
Jeff Trawick
7ed1b10217 Build (and do so cleanly) when !APR_HAS_OTHER_CHILD.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88986 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 18:42:51 +00:00
Jeff Trawick
58e376a83c Prevent a hang when a cgi handled by mod_cgid tries to read a
request body from its stdin but no reqest body is being written to
the cgi.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88975 13f79535-47bb-0310-9956-ffa450edef68
2001-05-02 16:58:21 +00:00
Jeff Trawick
dcff7edfd1 clean up some mod_cgid issues related to other child maintenance...
the APR_OC_REASON_DEATH/APR_OC_REASON_LOST code was sending SIGWINCH
  to the parent (usually init) instead of itself

  APR_OC_REASON_RESTART/_UNREGISTER code separated so that we go through
  there once


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88697 13f79535-47bb-0310-9956-ffa450edef68
2001-04-03 19:12:14 +00:00
Jeff Trawick
2f0029b541 oops... really fix the storage leak this time... we were doing cleanups
after the last change, but we were losing the pool and its retained
storage


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88612 13f79535-47bb-0310-9956-ffa450edef68
2001-03-29 03:23:44 +00:00