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

285 Commits

Author SHA1 Message Date
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
Jeff Trawick
b428e822db zap a gcc warning about using an uninitialized variable (new) and
check for a possible syntax error


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96836 13f79535-47bb-0310-9956-ffa450edef68
2002-09-16 13:11:55 +00:00
William A. Rowe Jr
c5b0867a95 Modify ap_open_logs (an internal function) to follow the hook open_logs
argument schema so it can be directly invoked by the hook handler.  Also
  clean up the open_logs processing to return an error rather than simply
  exit()ing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96829 13f79535-47bb-0310-9956-ffa450edef68
2002-09-15 22:04:01 +00:00
Justin Erenkrantz
92b395d754 Allow AddOutputFilterByType to take in multiple filters.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96819 13f79535-47bb-0310-9956-ffa450edef68
2002-09-15 00:30:56 +00:00
Justin Erenkrantz
13a0a92e12 Fix memory leak in core_output_filter.
This would result in at least two EOS buckets being leaked per connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96752 13f79535-47bb-0310-9956-ffa450edef68
2002-09-10 19:41:43 +00:00
Ian Holsman
a525e2a5ad Major/Minor/Min[imal]
now working as one (with a sane mind) would thing it should


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96501 13f79535-47bb-0310-9956-ffa450edef68
2002-08-23 18:05:38 +00:00
Ian Holsman
df6a0c3e94 new option to ServerTokens. "Maj[or]" which displays a server response
similar to Apache/2.0

Also surfaced the directive in the standard config, defaulting to FULL


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96500 13f79535-47bb-0310-9956-ffa450edef68
2002-08-23 17:24:39 +00:00
Brian Pane
89dd7d9c9d Zero-copy output for small files delivered over keepalive
connections (previously, the setaside code in the core output
filter would copy file buckets <8KB into the heap, resulting
in poor keepalive performance)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96431 13f79535-47bb-0310-9956-ffa450edef68
2002-08-18 07:16:01 +00:00
William A. Rowe Jr
e925d0a202 Pardon je, it seems the most obvious solutions are always the easiest
to incorporate new bugs.  Solve the 0index.html bad uri bug.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96316 13f79535-47bb-0310-9956-ffa450edef68
2002-08-06 20:02:07 +00:00
William A. Rowe Jr
3653eaa40e This was never a 'vulnerability'... the APR_FILEPATH_SECUREROOT flag
passed to apr_filepath_merge refused to merge any rooted 'addpath'.
  However, that isn't the traditional 1.3 behavior, so fly past any
  leading '/'s on the way to merging the uri to the DocumentRoot.

PR: 10946


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96314 13f79535-47bb-0310-9956-ffa450edef68
2002-08-06 16:27:36 +00:00
Ian Holsman
705f189757 format to 80 chars
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96303 13f79535-47bb-0310-9956-ffa450edef68
2002-08-04 15:15:57 +00:00
William A. Rowe Jr
6b69fe06c0 Timeout/time fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96055 13f79535-47bb-0310-9956-ffa450edef68
2002-07-15 07:46:19 +00:00
Jeff Trawick
c173b5078d spell check a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95991 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 01:07:21 +00:00
William A. Rowe Jr
2604f8bdbb Changes for deprecated apr_is_fnmatch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95976 13f79535-47bb-0310-9956-ffa450edef68
2002-07-08 17:43:34 +00:00
Ian Holsman
6deba78a9a Renames Pending:
This clears the list of renames pending in apr-util.
 Parts of this list was alreadu done, but the pending list hadn't been updated.

 apr_hook_debug_current     from apr_current_hooking_module
 apr_hook_debug_show        from apr_show_hook

 apr_hook_global_pool       from apr_global_hook_pool
 apr_hook_sort_all          from apr_sort_hooks

 apr_uri_port_of_scheme     from apr_uri_default_port_for_scheme
 apr_uri_unparse            from apr_uri_unparse_components
 apr_uri_parse              from apr_uri_parse_components
 apr_uri_parse_hostinfo     from apr_uri_parse_hostinfo_components

 apr_uri_t                  from apr_uri_components

 All APR_URI_*              from all APU_URI_* symbols
 All APR_UNP_*              from all UNP_* symbols

PR:
Obtained from:
Submitted by:	 Thom May
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95966 13f79535-47bb-0310-9956-ffa450edef68
2002-07-06 20:04:38 +00:00
Sander Striker
62faca71e7 Add a new directive: MaxMemFree. MaxMemFree makes it possible
to configure the maximum amount of memory the allocators will
hold on to for reuse.  Anything over the MaxMemFree threshold
will be free()d.  This directive is usefull when uncommon large
peaks occur in memory usage.  It should _not_ be used to mask
defective modules' memory use.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95954 13f79535-47bb-0310-9956-ffa450edef68
2002-07-04 15:20:54 +00:00
Brian Pane
8c86d4bf88 Optimized the addition of the core output filter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95941 13f79535-47bb-0310-9956-ffa450edef68
2002-07-02 21:40:13 +00:00
Brian Pane
d6baa119a0 Replaced ap_add_input_filter() call with cheaper ap_add_input_filter_handle()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95940 13f79535-47bb-0310-9956-ffa450edef68
2002-07-02 21:35:19 +00:00
Justin Erenkrantz
798c1dae43 Add a filter_init function to the filters so that a filter can execute
arbitrary code before the handlers are invoked.

This resolves an issue with incorrect 304s on If-Modified-Since mod_include
requests since ap_meets_conditions() is not aware that this is a dynamic
request and it is not possible to satisfy 304 for these requests (unless
xbithack full is on, of course).  When mod_include runs as a filter, it is
too late to set any flag since the handler is responsible for calling
ap_meets_conditions(), which it should do before generating any data.

If a module doesn't need to run such arbitrary code, it can just pass NULL
as the argument and all is well.

PR:	9673
Reviewed by:	Ryan Bloom and others


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95906 13f79535-47bb-0310-9956-ffa450edef68
2002-06-28 08:40:25 +00:00
Justin Erenkrantz
561d4c3874 Strengthen error-detection code in HTTP_IN and core_input_filter so that
invalid readbytes or errors reading brigades are properly handled.

Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95897 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 05:18:19 +00:00
Justin Erenkrantz
518af3ff49 - Fix segfault in core_output_filter when we are passed an empty brigade.
- Stash the remainder of the brigade in more when we see a flush bucket.
  Previous to this commit, we would only process the buckets before the
  flush on a HTTP/1.0 request and then return.

We are proably only finding this now since we now correctly check for
keepalive connection status.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95896 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 05:00:23 +00:00