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

1564 Commits

Author SHA1 Message Date
Ryan Bloom
4d4ce3209a Port the MaxClients changes from the worker MPM to the threaded
MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91483 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 04:02:28 +00:00
William A. Rowe Jr
5e3b2442bf Fix the little bits o' breakage I introduced with the last two
'theoretical' corrections.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91482 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 02:23:42 +00:00
William A. Rowe Jr
75ed984cc7 directory_walk trounced existing path_info declarations. I suspect _this_
was Greg Ames bug...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91481 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 02:19:42 +00:00
William A. Rowe Jr
940a7786c7 Streamline this function, and append the trailing slash for any directories
that are resolved.  Needs to be more tightly coupled to the dir_walk
  optimized cache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91480 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 02:15:45 +00:00
William A. Rowe Jr
317c6358d8 This will probably fix recent breakage to mod_negotation and httpd.test,
as well as the /manual/ returning docroot/index.  Need to look for another
  solution.  I'm suspecting path_info is possibly broken.

  Reverts 1.68, as suggested by Brian Havard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91479 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 01:57:45 +00:00
Victor J. Orlikowski
0215683198 Removed outdated apache.exports references
Submitted by: Aaron Bannert <aaron@clove.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91472 13f79535-47bb-0310-9956-ffa450edef68
2001-10-15 21:58:04 +00:00
Greg Ames
ad334fdd90 insure that a '*' in <VirtualHost *> or NameVirtualHost * matches all ports.
The recent change to eliminate the Port directive exposed this problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91470 13f79535-47bb-0310-9956-ffa450edef68
2001-10-15 15:32:14 +00:00
Greg Ames
db8132bab4 fix another seg fault.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91431 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 16:28:23 +00:00
Justin Erenkrantz
5902e1f3e3 The problem here is that we are getting some zero-length buckets at the head
of our brigade - which are in isolation okay.  In this situation, they
must be removed by the call to APR_BRIGADE_NORMALIZE.

The way we partition the buckets means that we will never remove the
zero-length bucket from the head - causing an infinite loop.  We read only
a single bucket now - previously partition with the blocking reads would
read multiple buckets - but it forced having a defined length which we
agreed was bogus.

Therefore, if we have a zero-length bucket at the head, we would then try
to partition and split at the zero-point of the brigade.  That combination
doesn't actually remove the zero-length bucket - it is still there - causing
an infinite loop because we'll never go past the zero-length bucket.

This call was originally present in core_input_filter.  I think it might
be better to fix partition/split/etc to eliminate a zero-length bucket
and skip it.  But, I'm not 100% sure that needs to happen.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91412 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 01:38:28 +00:00
Justin Erenkrantz
e109fb066b We also need to increment *readbytes when we find a match in the middle of
a bucket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91411 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 22:14:10 +00:00
Justin Erenkrantz
4efc873183 Yeah, let's just return this segment to how it was a few hours ago.
If the status code is anything other than SUCCESS for PEEK, it isn't
good.  Just return the value.

(I thought it should be this, but I wasn't 100% sure.  Peer review == good.)

Submitted by:	Will Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91404 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 19:19:16 +00:00
Justin Erenkrantz
55a8076e5d For some reason, I was thinking PEEK should read infinitely. Not.
Return with APR_EOF if we get EAGAIN.

(Whomever is calling this with PEEK should really be able to handle EOS
 bucket rather than relying on error codes.)

Thanks to Greg Ames for pointing out this fubar.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91403 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 18:45:22 +00:00
Justin Erenkrantz
008689be41 Allow the bucket reading code in the core to handle EAGAIN properly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91400 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 15:34:35 +00:00
Jeff Trawick
4f78b345b2 prefork: Don't segfault when we are able to listen on some but
not all of the configured ports.

Other points to ponder:

  why no log message for the segfault?

  similar change would seem to be needed in other MPMs...  we
  may be adding bogus entries to the poll set


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91399 13f79535-47bb-0310-9956-ffa450edef68
2001-10-10 15:12:12 +00:00
William A. Rowe Jr
f1f8494552 Always helps to add the member
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91380 13f79535-47bb-0310-9956-ffa450edef68
2001-10-09 03:15:05 +00:00
William A. Rowe Jr
9f1c799241 Speed it up. While this optimization wasn't obvious for the two-pass
location_walk, it is significant for all subreq/redirects reusing the
  cached walk values.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91378 13f79535-47bb-0310-9956-ffa450edef68
2001-10-09 02:41:47 +00:00
Greg Ames
8dd598a71f prevent near infinite subrequest recursion with mod_negotiation enabled.
This can happen if there is a partial match between a bad URI and a
file with a variant extention.

ap_sub_req_lookup_dirent has apparently been generating bogus subrequest
URIs for ages, but they used to be ignored.  Once we started calling
ap_process_request_internal for all subrequests, they started causing
problems.  Make it explicit that rnew->uri is to be ignored for this type
of subrequest.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91375 13f79535-47bb-0310-9956-ffa450edef68
2001-10-09 01:33:48 +00:00
Ryan Bloom
61cebdad7a Clean up the string passed to the error log hook. This removes the date,
time, error level, etc strings.  The only information in the string is
the actual error.
Submitted by:	Jon Travis <jtravis@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91373 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 23:28:57 +00:00
Greg Ames
9213036eae get symlinks working again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91371 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 22:07:32 +00:00
Jeff Trawick
b13cb7715c at least *this* cast keeps gcc happy (and should keep
everything else happy as well)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91368 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 21:13:51 +00:00
William A. Rowe Jr
e04108cee2 Revamped ap_directory_walk logic, without a path_info helper is now
activated.  It may be bumpy for a few days, and we have more optimizations
  to put in place, but it's time to get this in the developer's test code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91359 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 17:38:52 +00:00
William A. Rowe Jr
006f49d98a This is nothing but const bogosity. We have our very own manipulation,
we are allowed to touch the char *'s, even if we have a const contract.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91358 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 17:35:41 +00:00
William A. Rowe Jr
a933f4d949 Great badness - not a good idea to return OK when you don't modify the
resulting value, even if it's NULL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91345 13f79535-47bb-0310-9956-ffa450edef68
2001-10-07 04:54:53 +00:00
William A. Rowe Jr
526abd74c0 Hmmm... continue's not so good an idea here :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91344 13f79535-47bb-0310-9956-ffa450edef68
2001-10-06 22:47:20 +00:00
William A. Rowe Jr
05cd8ac520 Aaargh! Unwinding part of my patch before I committed the prior version,
I ended up blasting these (intentional) changes as well :(

  This finishes up the changes for the new, replacement ap_directory_walk
  for testing.  This code isn't active yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91342 13f79535-47bb-0310-9956-ffa450edef68
2001-10-06 22:16:11 +00:00
William A. Rowe Jr
2b9d60f5f5 A major overhaul to the -replacement- ap_directory_walk logic. This still
doesn't activate that code, I will do so probably by Monday, after more
  thorough testing.

  Introduces the ap_directory_walk::cache so we can stop wasting tons of
  effort in mod_autoindex and other subreq/redirect requests.

  This isn't thoroughly tested, I've only stepped through a half dozen
  common cases.  If you want to play, define REPLACE_PATH_INFO_METHOD.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91340 13f79535-47bb-0310-9956-ffa450edef68
2001-10-06 21:52:29 +00:00
Greg Stein
c8d19a10ac Don't attempt to call apr_xml_parser_done() twice -- just exit when we have
a problem terminating the parser. _geterror() cannot be called either.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91333 13f79535-47bb-0310-9956-ffa450edef68
2001-10-06 17:02:59 +00:00
Justin Erenkrantz
7541cc3073 We should only be doing one socket read under any circumstances
(blocking or not).

apr_brigade_partition would do reading multiple times and that's
not really what we want (so I think).

This may speed up POST requests that were waiting for all of the
data to arrive before returning anything in blocking mode.

Reviewed by:	Greg Stein, Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91322 13f79535-47bb-0310-9956-ffa450edef68
2001-10-06 00:47:06 +00:00
Justin Erenkrantz
0813cc35a8 Allow the core input filter to handle AP_NONBLOCK_READ request for a
finite number of bytes (i.e. *readbytes > 0).

ap_brigade_partition does a blocking read.  So, what we should do is
apr_bucket_read on the socket for non-blocking.  If we get less than
what they asked for, that's okay and we should just return that amount.
If they were non-blocking, we should always be non-blocking.

Ryan, Greg, and others can figure out if ap_brigade_partition should
be tweaked to handle AP_NONBLOCK_READ natively.  I'm of a mixed mind,
but this addresses the short term need.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91312 13f79535-47bb-0310-9956-ffa450edef68
2001-10-05 08:54:19 +00:00
Justin Erenkrantz
2cb3776fae I believe it is a kosher for a filter to return EOS, but return APR_SUCCESS
via ap_get_brigade.  So, we should treat this as end-of-input.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91311 13f79535-47bb-0310-9956-ffa450edef68
2001-10-05 08:51:43 +00:00
Jeff Trawick
2d0bcc2a70 get rid of an unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91301 13f79535-47bb-0310-9956-ffa450edef68
2001-10-05 02:27:48 +00:00
Ryan Bloom
b7bc1a03e7 Remove the Port directive. In it's place, the Listen directive
is now a required directive, which tells Apache what port to
listen on.  The ServerName directive has also been extended
to accept an optional port.  If the port is specified to the
ServerName, the server will report that port whenever it
reports the port that it is listening on.  This change was
made to ease configuration errors that stem from having a Port
directive, and a Listen directive.  In that situation, the server
would only listen to the port specified by the Listen command,
which caused a lot of confusion to users.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91293 13f79535-47bb-0310-9956-ffa450edef68
2001-10-04 20:00:53 +00:00
William A. Rowe Jr
e9efbadadb Correct file lookups when we are given a file within the same directory
as the parent request.  Also pulls a bunch of notes and code that was
  set aside, we don't need this with the other optimizations introduced.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91254 13f79535-47bb-0310-9956-ffa450edef68
2001-10-03 13:24:28 +00:00
Greg Ames
a119c52846 ap_sub_req_output_filter: don't pass along a brigade if it becomes empty
after deleting the EOS bucket.

This prevents a seg fault in mod_include when the connection dies.  There
doesn't seem to be much point in passing empty brigades in general.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91225 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 21:01:14 +00:00
Ryan Bloom
973dc48adc clean up the fdqueue a bit more, by implementing Greg's
suggestions to getting rid of redundant variables, as well as
converting the simple ap_queue_full/ap_queue_empty tests into macros.
This also reinstates the "not_full" condition, which turned out to
be useful afterall in cases where we wanted to prevent the listener
thread from accepting further connections until the worker queue has
room for more.

Submitted by:	[Aaron Bannert <aaron@clove.org>]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91223 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 19:37:20 +00:00
William A. Rowe Jr
bee1734a71 Nothing wrong with an int here, so make it explicit and kill the warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91217 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 15:49:02 +00:00
Justin Erenkrantz
f493313f3a Kill two autoconf-related birds with one commit.
- substr used in APACHE_MODULE for the help string did not parse correctly
  with autoconf 2.50+ so we had to punt there anyway and use AC_HELP_STRING.
- Add APACHE_HELP_STRING define that will call AC_HELP_STRING on 2.50+
  (actually not 2.13 - look at the regex call) or do our custom variation
  of it.  This function can't have any extra spaces or it will be returned
  in the help string.  So noted.  If anyone can figure out how to insert
  a line break like 2.50+ does when we go over the 26th column, I'd
  appreciate it.  I tried and I'm way too tired to figure it out now.
  Adding this would greatly simplify two or three HELP_STRING uses.
- Switch all of those annoying WITH and ENABLE functions to use the
  APACHE_HELP_STRING.  This makes everything consistent now.  I've always
  had to go through and keep aligning everything every few months or so
  because I'm the only one who cares.  No more.  I refuse to do it any more!
  Use APACHE_HELP_STRING or be crucified.

Looks decent with autoconf-2.13 and autoconf-2.52.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91211 13f79535-47bb-0310-9956-ffa450edef68
2001-09-30 07:57:15 +00:00
Justin Erenkrantz
66ee5533d3 Remove the lameo create_req hack and delay the addition of the HTTP_IN
filter until after we have read the headers.  This eliminates the status
hack that was in http_protocol.c and makes it all around better.

server/protocol.c now directly adds HTTP_IN filter - should we create a
specific hook for this?  (Could we do this as a post_read_request hook?)
I'm not terribly sure, but let's move it down to the lowest possible
place in ap_read_request.  We can change this detail later as we see fit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91192 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 08:48:59 +00:00
Justin Erenkrantz
6c7a7c36b2 Implement suggested input filter improvements from Greg and Ryan.
- Clean up scopes and namings of certain variables
- Add comments about potentially bogus modes
- Consolidate a FOREACH loop into a single brigade_length call


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91191 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 08:33:02 +00:00
Justin Erenkrantz
08eb7609da Input filtering rewrite. Consolidate how we handle HTTP input parsing by
rearranging and rethinking some things.  The net result is that the HTTP
filter is now a request filter and is now only responsible for HTTP things.
The core input filter is now responsible for handling all of the dirty work.

Highlights:
- Removes the dechunk filter and merges it with ap_http_filter (aka HTTP_IN).
  The dechunk filter was incorrectly handling certain cases (trailers).
- Moves ap_http_filter from a connection filter to a request filter
  to support the consolidation above (it needs header info).
- Change support code to allow the http_filter to be a
  request filter (how the request is setup initially).
- Move most of the logic from HTTP_IN to CORE_IN (core_input_filter).
  HTTP_IN is now only concerned about HTTP things.  The core filter
  is now responsible for returning data.  It is impossible to
  consolidate dechunk and http without this because HTTP_IN previously
  buffered data.  As Greg has suggested, it may make sense to write
  some brigade functions that handle input (getline).  It should be
  fairly trivial to add these.  Some of the calls in ap_http_filter
  could be switched as well.

This is the original patch as submitted to dev@httpd on Monday, Sep.
24th.  Additional comments and some minor tweaks done after that
submission are coming up next.  This should allow people who reviewed
the original patch to see what has changed and review them piecemeal.

This test passes all current tests in httpd-test.  Please perform
chicken sacrifices to verify that this hasn't blown up your favorite
input.

Reviewed by:	Greg Stein, Ryan Bloom, and Cliff Woolley (buckets)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91189 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 08:17:11 +00:00
Justin Erenkrantz
d7a730adcf Fix for httpd-test modules/include test #17.
If we are *already* a faux URI (i.e. relative file sub req) and we then
make a subrequest from that faux URI to a file in the same directory,
we'd try to build a URI out of the fake URI which leads to the wrong
thing happening somewhere down the line.  So, let's just give this
special case a fake URI as well.

OtherBill needs to verify this.  He can back it out if he wants.  I
don't much care.  It's one line and it seems okay...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91187 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 06:54:08 +00:00
William A. Rowe Jr
e748927d17 Optimize file_walk with the same logic as location_walk. Fix both to
have a bit more legibility, and tighter locality of scope for a smaller
  number of variables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91186 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 19:50:22 +00:00
William A. Rowe Jr
8e82ad3743 Split out (soon to be) common code for all _walk functions
(no net change to location_walk).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91185 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 18:56:21 +00:00
William A. Rowe Jr
e11c9604fe Debug conf pool constness. This is a noop most of the time on most
platforms, but it's only called twice per restart, so this is mostly
  harmless.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91178 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 15:24:34 +00:00
William A. Rowe Jr
6d273ef60f Overhaul the compatibility with 1.3's subrequest and redirect processing.
Eliminate URI-centric phases in ap_process_request_internal() for pure
  file subrequests (that don't correspond to URI space.)  translate_name
  hook and location_walks are skipped for these requests.

  Moves the reset of the per_dir_config out of directory_walk into the
  internal request processing code, so that resources with alternate
  map_to_storage requirements start with clean r->server->lookup_defaults.

  Optimizes out the authn/authz of effectively identical subreqests and
  redirects, as the sub_req_lookup calls once did.  Unlike 1.3, we copy
  r->user and r->ap_auth_type from main/prev for the request's reference.

  Stop copying the subrequest's r->chunked flag (Rbb assured me it looked
  bogus, chunking is on the parent request) and clean out other #if 0'ed
  cruft we don't need to refer back to anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91169 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 04:46:37 +00:00
William A. Rowe Jr
1fdecc1352 Remove the translate_name hack that caused Greg Ames some grief with
mod_rewrite.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91168 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 04:35:59 +00:00
Jeff Trawick
42ac007cc6 fix a gcc warning -- "/* within a comment"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91140 13f79535-47bb-0310-9956-ffa450edef68
2001-09-25 09:46:37 +00:00
Ryan Bloom
73e98fdd59 Clean the worker MPM a bit. This removes the idea of compiling worker
with no threads.  That doesn't make any sense anyway.  Also, raise
HARD_SERVER_LIMIT to 16, from 8.

Submitted by:	"Ian Holsman" <ianh@cnet.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91137 13f79535-47bb-0310-9956-ffa450edef68
2001-09-24 23:03:42 +00:00
William A. Rowe Jr
1c120280da Solve a symbol from later PlatformSDK's that a VC5 user may or may not
have installed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91134 13f79535-47bb-0310-9956-ffa450edef68
2001-09-24 22:02:14 +00:00
William A. Rowe Jr
b81cd40787 PATHEXT is a critial Win32 cmd.exe variable that declares _which_ extensions
are given command-name status (such as .exe;.bat;.com;.cmd etc.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91132 13f79535-47bb-0310-9956-ffa450edef68
2001-09-24 21:09:06 +00:00