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

405 Commits

Author SHA1 Message Date
Bradley Nicholes
c234404445 If large file support is enabled allow the file to be split into AP_MAX_SENDFILE sized buckets. Otherwise Apache will be unable to send files larger than 2 gig due to signed 32-bit limitations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102231 13f79535-47bb-0310-9956-ffa450edef68
2004-01-08 17:50:03 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
3efb8f70cc Fix <Limit> and <LimitExcept> parsing to require a closing '>'
in the initial container.

PR:                25414
Submitted by:	   Geoffrey Young <geoff apache.org>]
Reviewed by:	   Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102021 13f79535-47bb-0310-9956-ffa450edef68
2003-12-10 22:40:33 +00:00
Jeff Trawick
ffd07ca67c Account for some bytes handed to the network layer prior to
dropped connections.

Such bytes were counted on some paths but not on others.  If
these bytes are to be counted in some error paths, they should
be counted in the others.  We don't know if they were actually
presented to the client.

AFAIK, this only affects mod_logio.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101832 13f79535-47bb-0310-9956-ffa450edef68
2003-11-21 15:02:04 +00:00
Jeff Trawick
26c3384089 axe a comment... as with so many things, the true part isn't
interesting and the interesting part isn't true


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101829 13f79535-47bb-0310-9956-ffa450edef68
2003-11-21 03:29:11 +00:00
Jeff Trawick
6159e9455c simplify just a bit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101828 13f79535-47bb-0310-9956-ffa450edef68
2003-11-21 03:26:14 +00:00
Cliff Woolley
aaf0424e2b get rid of _FOREACH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101788 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 02:09:14 +00:00
Jim Jagielski
1ee9b271ec parsed_uri.port is only valid iff parsed_uri.port_str != NULL.
Old code simply checked if it was non-zero, not if it
was *valid*

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101774 13f79535-47bb-0310-9956-ffa450edef68
2003-11-13 15:18:35 +00:00
Bradley Nicholes
b9f260e722 When UseCanonicalName is set to OFF, allow ap_get_server_port to check
r->connection->local_addr->port before defaulting to server->port or
ap_default_port().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101519 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 17:07:26 +00:00
Martin Kraemer
fc166765da Cosmetics: remove redundancy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101356 13f79535-47bb-0310-9956-ffa450edef68
2003-09-30 09:30:06 +00:00
Jeff Trawick
e470e0e792 change some error log messages to be more concise
Submitted by:	Bill Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101311 13f79535-47bb-0310-9956-ffa450edef68
2003-09-25 20:50:26 +00:00
Jeff Trawick
25103911fe Log an error when requests for URIs which fail to map to a valid
filesystem name are rejected with 403.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101310 13f79535-47bb-0310-9956-ffa450edef68
2003-09-25 16:00:56 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
Stas Bekman
288d1a993d fix doc typo
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101061 13f79535-47bb-0310-9956-ffa450edef68
2003-08-22 20:57:32 +00:00
André Malo
a9ca268476 that loop was totally bogus.
r->content_type contains no more than one c-t
use ap_field_noparam to strip the decoration and
just a single condition to check the validity of r->content_type


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100763 13f79535-47bb-0310-9956-ffa450edef68
2003-07-24 15:26:56 +00:00
André Malo
cc0bce57b0 don't reverse the filter order in AddOutputFilterByType
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100760 13f79535-47bb-0310-9956-ffa450edef68
2003-07-24 14:36:54 +00:00
Martin Kraemer
38ea0e8488 DocumentRoot always used to be interpreted relative to ServerRoot. Make it server_root_relative like in Apache-1.3
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100315 13f79535-47bb-0310-9956-ffa450edef68
2003-06-20 12:53:52 +00:00
Greg Ames
d33f0ca220 core_output_filter: don't split the brigade after a FLUSH bucket if it's the
last bucket.  This prevents creating unneccessary empty brigades which may
not be destroyed until the end of a keepalive connection.

Submitted by:	Juan Rivera <Juan.Rivera@NO_SPAM.citrix.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100210 13f79535-47bb-0310-9956-ffa450edef68
2003-06-11 17:46:25 +00:00
André Malo
8dd8543053 Rework of the recursion stopper - collapse recursion counters into one function
Reviewed by: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100095 13f79535-47bb-0310-9956-ffa450edef68
2003-05-29 23:04:32 +00:00
André Malo
1af02389bb Prevent the server from crashing when entering infinite loops. The
new LimitInternalRecursion directive configures limits of subsequent
internal redirects and nested subrequests, after which the request
will be aborted.
[William Rowe, Jeff Trawick, Andr� Malo]

PR: 19753 (and probably others)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99911 13f79535-47bb-0310-9956-ffa450edef68
2003-05-19 01:19:55 +00:00
Jeff Trawick
e686a699c1 fix a bogus check for IPv6 support that led to an unnecessary
string search on builds of Apache without IPv6 support

Submitted by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99776 13f79535-47bb-0310-9956-ffa450edef68
2003-05-13 14:22:45 +00:00
Martin Kraemer
ca4f07bcac Porting to BS2000: the antique interface (BS2000Account) no longer exists
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99747 13f79535-47bb-0310-9956-ffa450edef68
2003-05-09 21:37:06 +00:00
André Malo
08146d0cf3 Throw a warning if AllowOverride is used inside of <Location> or <Files>.
Unfortunately there's no clean way to detect <DirectoryMatch>. It would
not be sufficient, because <Directory ~> should be checked then, too.
Hmm.

PR: 19512


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99695 13f79535-47bb-0310-9956-ffa450edef68
2003-05-02 21:50:55 +00:00
Jeff Trawick
39402b244a Fix ap_construct_url() so that it surrounds IPv6 literal address
strings with [].  This fixes certain types of redirection.

PR:             19207


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99517 13f79535-47bb-0310-9956-ffa450edef68
2003-04-22 14:51:42 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Ken Coar
12b11896a7 here we go. add a directive that will keep %2f from being
decoded into '/', allowing the *_walk to do their magic and
	return 404 if it's in the path, and allowing it in the path-info.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98479 13f79535-47bb-0310-9956-ffa450edef68
2003-01-23 21:34:13 +00:00
André Malo
fe5980e409 move rfc1413 code to a new module "metadata:mod_ident".
The rfc1413 code itself is mostly c&p, but can still bear
some rework ...

This patch removes the global ap_rfc1413 function and the
ap_rfc1413_timeout variable. It also introduces a new config
directive IdentityCheckTimeout (default 30 sec).

Reviewed by: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98320 13f79535-47bb-0310-9956-ffa450edef68
2003-01-18 03:37:55 +00:00
William A. Rowe Jr
8c4d7da6e0 With the latest patch to config.c wildcards now work.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98265 13f79535-47bb-0310-9956-ffa450edef68
2003-01-14 17:01:32 +00:00
William A. Rowe Jr
1f49164f58 Once again, allow <Directory "C:\Users\*\html_files"> or other wildcard
patterns in Directory blocks.  Note a similar problem with Includes *.conf


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98260 13f79535-47bb-0310-9956-ffa450edef68
2003-01-14 03:01:52 +00:00
Greg Ames
2c46e908a1 core_output_filter: re-instate the deferred_write pool patch so we don't
leak fd's until the end of a keepalive connection.

Thanks to:
  Jeff Trawick for the original concept
  Sander Striker for the mmap ring idea
  Cliff Woolley for implementing the above change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97824 13f79535-47bb-0310-9956-ffa450edef68
2002-12-09 22:19:26 +00:00
Greg Ames
f19f059390 core_output_filter: back out changes to clean up resources before the end
of a keepalive connection until we can figure out how to do it safely for
mmap buckets


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97539 13f79535-47bb-0310-9956-ffa450edef68
2002-11-16 02:27:33 +00:00
Greg Ames
a15e0ab135 core_output_filter: use the current input brigade's pool for the "more"
brigade when we defer network writes due to small data + keepalives.  This
prevents leaking resources in the "more" brigade until the end of the
connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97503 13f79535-47bb-0310-9956-ffa450edef68
2002-11-13 15:07:35 +00:00
Jeff Trawick
f43d3e01d5 can't mix declarations and statements except with gcc 3.2 :)
(or possibly RedHat 8's patches to it)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97488 13f79535-47bb-0310-9956-ffa450edef68
2002-11-11 21:08:26 +00:00
Greg Ames
25fa263af3 prevent seg faults when running with Electric Fence.
The "more" brigade (created by apr_brigade_split after seeing a FLUSH bucket)
was in the deferred_write_pool.  d_w_p is cleared, "more" is copied into b,
then the while loop test for APR_BRIGADE_EMPTY(b) blows up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97484 13f79535-47bb-0310-9956-ffa450edef68
2002-11-11 19:57:58 +00:00
Greg Ames
a809b7f73d core_output_filter: straighten out the parens for the decision to set aside.
Pointed out by: gcc and Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97463 13f79535-47bb-0310-9956-ffa450edef68
2002-11-08 19:20:04 +00:00
Greg Ames
1576999f17 use a subpool of c->pool for resources which are set aside, then clear it
after writing the data to the network.  This closes files sooner with
keepalive connections.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97462 13f79535-47bb-0310-9956-ffa450edef68
2002-11-08 17:19:10 +00:00
Jeff Trawick
b7a385a686 adjust some parents to make the expression a tiny bit clearer and to
make gcc happy

> core.c: In function `core_output_filter':
> core.c:3884: warning: suggest parentheses around && within ||


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97459 13f79535-47bb-0310-9956-ffa450edef68
2002-11-08 13:17:09 +00:00
Greg Ames
e2422aa828 no functional change...factor out a common subexpression
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97431 13f79535-47bb-0310-9956-ffa450edef68
2002-11-06 19:34:51 +00:00
Justin Erenkrantz
b8b583d0c4 The value emitted by ServerSignature now mimics the Server HTTP header as
controlled by ServerTokens.

Submitted by:	Francis Daly <deva@daoine.org>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97416 13f79535-47bb-0310-9956-ffa450edef68
2002-11-06 01:55:15 +00:00
Bill Stoddard
0c7b50af69 Small performance tweaks to net_time_filter and core_input_filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97390 13f79535-47bb-0310-9956-ffa450edef68
2002-11-04 15:15:09 +00:00
Jeff Trawick
b5ba424ad0 Fix streaming output from an nph- CGI script. CGI:IRC now
works.

core output filter needs to detect when no more data is available from
a pipe for a while so that it can flush what is already there

normally, content-length filter handles this but for nph- script
we don't have content-length filter in place

PR:             8482


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97301 13f79535-47bb-0310-9956-ffa450edef68
2002-10-25 15:18:53 +00:00
Brian Pane
816177d6ec mod_logio modification: count bytes-sent after the writev or sendfile
call in the core_output_filter, in order to get a more accurate count
of the total bytes transmitted in cases where the client terminates
the connection before the entire response is sent.

Note: This works by adding a flush bucket to each response when
mod_logio is used; the side-effect is that pipelined responses
get broken up into separate network writes per request (but there's
no impact on pipelining when mod_logio is not enabled).

Submitted by:	Bojan Smojver <bojan@rexursive.com>
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97300 13f79535-47bb-0310-9956-ffa450edef68
2002-10-25 06:52:02 +00:00
William A. Rowe Jr
b2e122738e Use a better name for the APR_SENDFILE_ENABLE flag.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97211 13f79535-47bb-0310-9956-ffa450edef68
2002-10-14 20:08:15 +00:00
William A. Rowe Jr
a1ef1921c7 Introduce an EnableSendfile directive (defaulted to ON) to allow users
to disable sendfile mechanics for NFS volume mounts and other kernel
  objects that don't support sendfile.  And EnableSendfile off can be used
  to help narrow bugs down to the sendfile mechanics or eliminate the
  possiblity that sendfile is a factor on any given platform.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97205 13f79535-47bb-0310-9956-ffa450edef68
2002-10-14 17:42:45 +00:00
William A. Rowe Jr
e9782db913 What once were macros no longer need line continuation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97192 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 18:22:55 +00:00
Greg Stein
72f0111ad8 Add logic to the default_handler to enable script delivery to script
processors located in the output filter stack. This is on by default,
but will change "soon" to off -- the processors will then need to
enable it when they are installed into the filter chain.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97065 13f79535-47bb-0310-9956-ffa450edef68
2002-10-03 00:16:47 +00:00
William A. Rowe Jr
01b9944772 *) SECURITY: [CAN-2002-0840] HTML-escape the address produced by
ap_server_signature() against this cross-site scripting
     vulnerability exposed by the directive 'UseCanonicalName Off'.
     Also HTML-escape the SERVER_NAME environment variable for CGI
     and SSI requests.  It's safe to escape as only the '<', '>',
     and '&' characters are affected, which won't appear in a valid
     hostname.  Reported by Matthew Murphy <mattmurphy@kc.rr.com>.
     [Brian Pane]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97064 13f79535-47bb-0310-9956-ffa450edef68
2002-10-02 21:35:57 +00:00
William A. Rowe Jr
7fd6a8c450 Until we have a mechanism to allow PHP and others to 'raise their hand'
and claim 'POST' we have to continue to accept POST in the default
  handler.  Revert to rev 1.206 per Rbb's and wrowe's veto.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97063 13f79535-47bb-0310-9956-ffa450edef68
2002-10-02 21:32:01 +00:00
Greg Stein
8b8a1baba5 Fix bug in the default handler. POST is not allowed on regular files.
The resource must be handled by something *other* than the default
handler.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97046 13f79535-47bb-0310-9956-ffa450edef68
2002-10-01 16:24:41 +00:00
Ryan Bloom
a8e87256bf Call out the success cases when we don't get APR_SUCCESS back from the
network write.  All other status codes result in c->aborted being set,
which allows the logs to note that the connection was aborted.  Previous
to this patch, if the network cable was unplugged on the client, the server
would get APR_ETIMEUP, but we wouldn't note that the connection was
aborted.

Submitted by:	Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97038 13f79535-47bb-0310-9956-ffa450edef68
2002-09-30 23:43:18 +00:00