1
0
mirror of https://github.com/apache/httpd.git synced 2025-09-11 09:30:48 +03:00

269 Commits

Author SHA1 Message Date
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
Jeff Trawick
8fe24d1f1b Fix a storage leak in mod_cgid... the temporary pool created for
each request was not cleaned up.

This removes the nastiest symptom of some excess pipes being created
(i.e., we don't run out of file descriptors), though something
additional is needed to keep from creating the pipes to begin with.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88611 13f79535-47bb-0310-9956-ffa450edef68
2001-03-29 00:17:50 +00:00
Jeff Trawick
26d5f3b1c8 get rid of unused parameter filename to function get_req()
PR:		6980


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88432 13f79535-47bb-0310-9956-ffa450edef68
2001-03-02 22:00:30 +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
Ryan Bloom
4296146043 Begin to move functions from the http module to the core. The goal is to
have only functions that are HTTP specific in the http directory.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88341 13f79535-47bb-0310-9956-ffa450edef68
2001-02-26 04:38:22 +00:00
Ryan Bloom
f740468deb Close the accepted socket before creating the CGI process in mod_cgid.
This is safe, because we have already dup'ed the socket for the CGI
process itself.  This change allows CGI processes to fork long-lived
child processes without affecting how quickly the response gets back
to the broswer.

PR:	7273
Submitted by:	Taketo Kabe <kabe@sra-tohoku.co.jp>
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88264 13f79535-47bb-0310-9956-ffa450edef68
2001-02-21 19:07:21 +00:00
Jeff Trawick
ad4230b947 get rid of a type mismatch warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88246 13f79535-47bb-0310-9956-ffa450edef68
2001-02-20 09:27:45 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +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
Doug MacEachern
d42ea0426e s/apr_bucket_pipe_creat/apr_bucket_pipe_create/ typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88141 13f79535-47bb-0310-9956-ffa450edef68
2001-02-13 20:16:15 +00:00
Greg Stein
dc44adee51 include "apr_signal.h" when needed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88082 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 01:09:02 +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
Greg Stein
23714288fe *) remove obsolete http_conf_globals.h
*) simplify all this #ifdef'ing: just nuke the unixd.h header. it isn't
   actually needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88045 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 03:03:18 +00:00