Ryan Bloom [Sat, 10 Nov 2001 21:07:13 +0000 (21:07 +0000)]
Fix the Windows MPM. Windows doesn't always use the lingering close
function. If it can re-use the socket, we are better off not calling
the function. To fix this, we re-expose the lingering_close function,
and we allow the MPM to remove the cleanup.
Ryan Bloom [Sat, 10 Nov 2001 18:26:30 +0000 (18:26 +0000)]
Remove ap_lingering_close from all of the MPMs. This is now done as
a cleanup registered with the connection_pool. I have also turned
ap_lingering_close into a static function, because it is only used
in connection.c. This is the next step to consolidating all of the
socket function calls. ap_lingering_close will only be added if the
core is dealing with a standard socket.
Stat, don't lstat the final target. This means we may double-stat the
final target file if check for symlinks reveals it's an APR_LNK, but this
is preferable to the convoluted code required to 'reuse' the original stat.
Reintroduce the 'one stat dir_walk', with singificantly more sensible
behavior than the old path_info logic.
If the stat() of r->filename succeeds ignore every segment that requires
no symlink check (and on Win32/OS2/Netware the name matches the canonical
name, assuring us that the case/aliases match the true name.)
This optimization can be improved by establishing a second cache of the
actual partial filenames that _are_ tested for symlinks (or canonical
filename case), and then skiping such tests when the conditions match on
successive passes for subrequests or redirects.
Clean up the declarations and comments of some of the variables in
ap_get_client_block.
There were two len_read vars (each of different types), so the outer one
was shadowed - move it to the correct scope.
Move apr_bucket* old declaration inside of the loop so it is obvious
what its scope is.
Martin Kraemer [Thu, 8 Nov 2001 14:29:37 +0000 (14:29 +0000)]
Fixed previous patch to reflect what Apache-1.3 did regarding self-
referential uri's, and updated the manual accordingly.
XXX There is a kludge here: XXX the port number from the client's Host:
header used to be tossed, and there is no clean mechanism to pass it
(in the request_rec) to other consumers. As the unparsed_uri structure
(which could avoid repeated parsing of URI, Host, Port etc) seems to be
mostly unused currently, I used that to pass the port.
Martin Kraemer [Thu, 8 Nov 2001 12:34:21 +0000 (12:34 +0000)]
When no port is given in a "ServerName host" directive, the
server_rec->port is now set to zero, not 80. That allows for
run-time deduction of the correct server port (depending on
SSL/plain, and depending also on the current setting of
UseCanonicalName). This change makes redirections
work, even with https:// connections. [Martin Kraemer]
David Reid [Thu, 8 Nov 2001 00:54:00 +0000 (00:54 +0000)]
This doesn't feel quite right, but it doesn't cause any problems
and stops an irritation about the standard conf file for
BeOS which barfs if the User/Group is present.
Submitted by: Brad Froehle <epEnochRoot@yahoo.com>
Reviewed by: David Reid <dreid@apache.org>
Aaron Bannert [Wed, 7 Nov 2001 19:59:51 +0000 (19:59 +0000)]
Please do not mix spaces and tabs within the same blocks, and please do not
arbitrarily and inconsistently wrap lines. I apologise ahead of time for
mucking up the cvslog, but this needed to be done.
Greg Ames [Wed, 7 Nov 2001 15:41:43 +0000 (15:41 +0000)]
Insure that ap_get_client_block _always_ sets the length parm positive when
calling ap_get_brigade. This takes care of the loop with short request bodies
seen on 2.0.27.
This eliminates the use of r->remaining within ap_get_client_block.
http_filter has the equivalent in its context. r->remaining is
still used in ap_setup_client_block for a "body too long" check. But that
check can't cover chunked bodies, so it probably should happen elsewhere.
Doug MacEachern [Wed, 7 Nov 2001 05:41:22 +0000 (05:41 +0000)]
ap_getline() is useful to modules outside of the core..
change declaration from AP_CORE_DECLARE to AP_DECLARE so it can be used
used outside the core
PR:
Obtained from:
Submitted by:
Reviewed by:
Joshua Slive [Tue, 6 Nov 2001 19:09:51 +0000 (19:09 +0000)]
Put the ssl docs in a format where they will be maintainable without Ralf's
tools. Mostly I've only touched the top and the bottom of each doc.
I also got rid of the old cover page and the overview, since they seemed
obsolete.
Once again, I apologize for wrecking Ralf's nice work.
htdbm provides a compiled interface to dbm authentication databases,
using the compiled-in dbm manager and auth schema. Resolves the hassles
of grabbing the appropriate cpan package for md5 and fixing the dbm
engine for dbmmanage.pl.
Joshua Slive [Tue, 6 Nov 2001 16:06:13 +0000 (16:06 +0000)]
I am just moving the reference chapter of the ssl docs into the modules directory
to be the baseline. The next commit will put it in the correct format.
Ian Holsman [Mon, 5 Nov 2001 23:06:55 +0000 (23:06 +0000)]
Fix so that errordocument works when a error gets returned from the
proxy.
Problem was ErrorHandler thought it was in some kind of recursion and
couldn't find the custom error document
Obtained from: Jin Hong <jinh@cnet.com>
Submitted by:
Reviewed by: Ian Holsman
This patch optimizes away some strlen and strcat calls in
ap_directory_walk. The strlen calls, in particular, had
ranked as a top bottleneck in the usr-space code in recent
performance profiling.
Submitted by: Brian Pane <bpane@pacbell.net>
Reviewed by: Justin Erenkrantz
Aaron Bannert [Fri, 2 Nov 2001 21:49:35 +0000 (21:49 +0000)]
Forces suexec to be compiled statically. This is necessary since it
is difficult and sometimes impossible to relocate executables that
are both setuid and dependent on dynamically loaded libraries.
(that is: setuid binaries ignore LD_* environment variables).
Greg Stein [Fri, 2 Nov 2001 19:25:50 +0000 (19:25 +0000)]
Don't change the type of the new resource. The provider will update it
when the copy/move takes place.
Specifically, the new location might imply a different type from the
original, so updating the type is bad mojo. In the observed case, a
resource was copied into a working collection; the type of the new
resource is supposed to be WORKING. Copying the type would be wrong if
the source was REGULAR.
Make this a bit more formal, as in httpd.conf. Also should cite the
contributor, but only Ralf knows who all should be the primary citation,
if not simply "the modssl project". I don't know if this conf is all
new material, significantly created by the modssl project, or if much
of it goes all the way back to ApacheSSL. Rather that miss-attribute,
I'm leaving line one for someone else [Ralf?] to add, vis-a-vie the
citation in httpd-std.conf line 2.
Roy T. Fielding [Thu, 1 Nov 2001 00:05:58 +0000 (00:05 +0000)]
Since we are in a file that is only included with mod_ssl.c and
there is no point in any of it if SSL is not defined, just wrap
the whole thing in one IfDefine.
Greg Ames [Wed, 31 Oct 2001 21:14:23 +0000 (21:14 +0000)]
change ap_getline to return the size of the buffer when there's no apparent end
to an input line. This is more like the 1.3 behavior which should help the
callers recognize this condition.
Greg Ames [Wed, 31 Oct 2001 20:18:56 +0000 (20:18 +0000)]
return the actual number of bytes read when we're in "read a line" mode and it
looks like the line may never end.
This lets ap_getline determine whether there's excessive bytes or not,
depending on the size of its caller's buffers. If the buffer can accomodate
more bytes, ap_getline will continue to read.
Aaron Bannert [Wed, 31 Oct 2001 18:21:53 +0000 (18:21 +0000)]
Fix a big memory leak bug related to arbitrarily large header lines.
The core input filter would happily consume all the data you gave it
in a header line, looking for that one LF. This patch limits that
"getline" functionality to HUGE_STRING_LEN (8192 bytes).