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

375 Commits

Author SHA1 Message Date
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
Jeff Trawick
0ea28da356 Stop using HARD_SERVER_LIMIT/HARD_THREAD_LIMIT all over the place
and instead use the mpm query function to retrieve those limits and
use those dynamically-retrieved values when walking the scoreboard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92510 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 04:59:13 +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
0b71b9d040 export file for mod_cgid...
this isn't the only one needed, but somebody needed this one...
I'll take a few minutes sometime soon and see which others we
need

Submitted by:	Dick Dunbar (RLDunbar@pacbell.net)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92267 13f79535-47bb-0310-9956-ffa450edef68
2001-11-30 21:46:27 +00:00
Aaron Bannert
799570495a Only let the "suEXEC enabled" message be printed once, even when we
have a DSO that goes through the load-unload-load cycle.

Suggested by:	Ryan Morgan <rmorgan@covalent.net>, Cliff Woolley


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92256 13f79535-47bb-0310-9956-ffa450edef68
2001-11-30 01:18:25 +00:00
Aaron Bannert
6b5df3c7af Add back in the "suEXEC mechanism enabled (wrapper: /path/to/suexec)"
message that we had back in apache-1.3 and is still scattered throughout
our docs.

Unfortunately, when mod_suexec is a DSO we're going to get this thing
twice in our logs. I believe as a side effect of the load-unload-load
cycles of our DSOs we're losing the static data segment, which is where
the "didn't we already report this" flag lives.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92255 13f79535-47bb-0310-9956-ffa450edef68
2001-11-29 23:34:09 +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
Ryan Bloom
e674055ddb Fix the cmd command for mod_include. When we are processing
a cmd command, we do not want to use the r->filename to set
the command name.  The command comes from the SSI tag.  To do this,
I added a variable to the function that builds the command line
in mod_cgi.  This allows the include_cmd function to specify
the command line itself.

PR:	8772


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92150 13f79535-47bb-0310-9956-ffa450edef68
2001-11-24 00:17:01 +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
Doug MacEachern
1ea11e594c remove test_pass_brigade; it lives in httpd-test not here
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92107 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 21:23:25 +00:00
Ian Holsman
f055c635f9 comment out module test_pass_brigade as it doesn't exist
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92105 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 21:15:15 +00:00
Ryan Bloom
aca4da4092 Fix a bug in our output filter buffering. If a lot of small brigades are
sent, the core will send the first 16 buckets, regardless of how much
data there is.  In the pathological case, this can cause a lot of 16
byte packets.  Now, if we see less than AP_MIN_BYTES, we combine
all of the buckets into a single bucket to be sent in a later packet.

This can cause a lot of memory copies, but it eases our network traffic.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92097 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 18:25:40 +00:00
Jeff Trawick
c229289a21 Get rid of threaded MPM. This commit has the actual code changes.
The deletes come next.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92036 13f79535-47bb-0310-9956-ffa450edef68
2001-11-19 18:07:28 +00:00
Bill Stoddard
e79f552386 Performance: Move the is_included strcmp to after the check to see if the
request is to be served by the cgi handler.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91876 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 16:32:33 +00:00
Cliff Woolley
d08f8fb019 Port Justin's mod_cgid change to mod_cgi.
mod_cgi wasn't actually broken in the way that mod_cgid was, but
it's still good do have these checks be against APR_SUCCESS rather
than 0 for clarity.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91868 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 04:34:13 +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
Ken Coar
d8e78dba8e Style-guide fixes, no functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91660 13f79535-47bb-0310-9956-ffa450edef68
2001-10-25 20:36:10 +00:00
William A. Rowe Jr
1338b5aa68 Restrict by content type and encoding before we go and try to drag in some
text to merge as headers and footers to autoindex pages.  This will escape
  index.gif from a bold attempt to use IndexHeader index ;)

  Also pass in the args to the subrequest, for anyone trying to decode what
  the user is looking at.  A great example of this coming up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91609 13f79535-47bb-0310-9956-ffa450edef68
2001-10-20 18:54:54 +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
Jeff Trawick
513f380012 fix a *printf() format
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91435 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 19:53:36 +00:00
William A. Rowe Jr
09944eaafd Finish the switch to huge file support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91407 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 20:05:13 +00:00
William A. Rowe Jr
4fea103d28 Support huge files from mod_asis
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91406 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 20:02:40 +00:00
William A. Rowe Jr
d41d182fe6 Short of removing the headers filter, this is the best asis can do.
Note that all body replies were entirely broken (thanks for helping
  me notice this, Greg :)

  Asis still needs patching for huge files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91401 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 18:37:35 +00:00
William A. Rowe Jr
d2f9c10bb0 Clean up some warnings by summing bytecounts into apr_off_t holders
instead of ulongs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91218 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 15:51:07 +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
Cliff Woolley
0db50e73c4 Fix constness problem reported by gcc:
mod_cgi.c: In function `include_cmd':
mod_cgi.c:812: warning: passing arg 1 of pointer to function from incompatible
pointer type

Reported by:	Ian's autobuild


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91062 13f79535-47bb-0310-9956-ffa450edef68
2001-09-18 03:33:30 +00:00
Cliff Woolley
0899bb29fd Doxygenize this
Submitted by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91061 13f79535-47bb-0310-9956-ffa450edef68
2001-09-18 03:21:29 +00:00
William A. Rowe Jr
772d477ee0 Here's the declaration for all to share. Don't expect many to use it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91059 13f79535-47bb-0310-9956-ffa450edef68
2001-09-17 22:12:49 +00:00
William A. Rowe Jr
f495937085 Remove the Win32 script-processing exception from mod_cgi, and
roll build_command_line/build_argv_list into a unified, overrideable
   ap_cgi_build_command optional function.

   Eliminates a ton of Win32 cruft from core.c for registry parsing.
   Win32 (through the default handler, and newest changes to the
   apr_proc_create fn) continues to serve .bat/.exe files.  This is in
   preparation for adding modules/arch/win32/mod_win32 for scripts.

   Please review the mod_cgi.c behavior very carefully.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91058 13f79535-47bb-0310-9956-ffa450edef68
2001-09-17 21:07:36 +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
William A. Rowe Jr
f0362ccc07 Toggle the /Zi flag to allow all supportd versions of VC (5, 6, 7) to
build 'out of the box' in debugging mode.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90686 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 05:21:50 +00:00