/[Apache-SVN]/httpd/httpd/trunk/server/core_filters.c
ViewVC logotype

Log of /httpd/httpd/trunk/server/core_filters.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 821526 - (view) (annotate) - [select for diffs]
Modified Sun Oct 4 12:21:29 2009 UTC (7 weeks, 4 days ago) by rpluem
File length: 28298 byte(s)
Diff to previous 821486 (colored)
* Fix 'may be used uninitialized in this function' compiler warning.

Revision 821486 - (view) (annotate) - [select for diffs]
Modified Sun Oct 4 09:29:38 2009 UTC (7 weeks, 4 days ago) by sf
File length: 28295 byte(s)
Diff to previous 821477 (colored)
merge if blocks

Revision 821477 - (view) (annotate) - [select for diffs]
Modified Sun Oct 4 08:08:50 2009 UTC (7 weeks, 4 days ago) by sf
File length: 28328 byte(s)
Diff to previous 815405 (colored)
Make sure to not destroy bucket brigades that have been created by earlier
filters. Otherwise the pool cleanups would be removed causing potential memory
leaks later on.

Revision 815405 - (view) (annotate) - [select for diffs]
Modified Tue Sep 15 17:11:25 2009 UTC (2 months, 1 week ago) by fuankg
File length: 28440 byte(s)
Diff to previous 814854 (colored)
defined apr_status_t rv one time at entry of ap_core_output_filter() instead of
multiple times within the code which caused compile break every now and then.

Revision 814854 - (view) (annotate) - [select for diffs]
Modified Mon Sep 14 21:03:31 2009 UTC (2 months, 1 week ago) by rpluem
File length: 28581 byte(s)
Diff to previous 814807 (colored)
* Replace brigade_move with apr_brigade_split_ex as spotted by pquerna.

Revision 814807 - (view) (annotate) - [select for diffs]
Modified Mon Sep 14 19:46:36 2009 UTC (2 months, 1 week ago) by rpluem
File length: 29097 byte(s)
Diff to previous 758613 (colored)
* Lower memory usage by reusing the brigade instead of constantly
  recerating one.

Submitted by: Stefan Fritsch <sf sfritsch.de>
Reviewed by: rpluem


Revision 758613 - (view) (annotate) - [select for diffs]
Modified Thu Mar 26 12:44:48 2009 UTC (8 months ago) by trawick
File length: 28771 byte(s)
Diff to previous 757853 (colored)
remove leader, perchild, and threadpool MPMs (other than non-English bits in common parts of the manual)

Revision 757853 - (view) (annotate) - [select for diffs]
Modified Tue Mar 24 15:43:59 2009 UTC (8 months ago) by trawick
File length: 28832 byte(s)
Diff to previous 722399 (colored)
Introduce a new set of APIs to allow MPMs to be proper modules instead
of integral parts which share global variables, functions, and macros
with the rest of httpd.

Converted now:
  prefork, worker, event, simple, WinNT*

*WinNT hasn't been built or tested, and relies on a hack to include the
WinNT mpm.h to disable Unixy MPM support routines in mpm_common.c

Revision 722399 - (view) (annotate) - [select for diffs]
Modified Tue Dec 2 08:13:36 2008 UTC (11 months, 3 weeks ago) by pquerna
File length: 28849 byte(s)
Diff to previous 708144 (colored)
API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.

Revision 708144 - (view) (annotate) - [select for diffs]
Modified Mon Oct 27 11:39:04 2008 UTC (13 months ago) by rpluem
File length: 28829 byte(s)
Diff to previous 645455 (colored)
* Do more greedy reads in the core input filter to get more closer to the
  number of bytes requested.

Revision 645455 - (view) (annotate) - [select for diffs]
Modified Mon Apr 7 10:45:43 2008 UTC (19 months, 2 weeks ago) by pquerna
File length: 27548 byte(s)
Diff to previous 590038 (colored)
Remove all references to CORE_PRIVATE.

Revision 590038 - (view) (annotate) - [select for diffs]
Modified Tue Oct 30 11:21:11 2007 UTC (2 years ago) by jfclere
File length: 27569 byte(s)
Diff to previous 568202 (colored)
Otherwise it doesn't compile on HP-UX when using cc.

Revision 568202 - (view) (annotate) - [select for diffs]
Modified Tue Aug 21 17:27:31 2007 UTC (2 years, 3 months ago) by pquerna
File length: 27543 byte(s)
Diff to previous 521681 (colored)
Only cleanup new_bb, if it isn't NULL, fixing a crash in the event MPM when write compeltion is active and a client disconnects.

Revision 521681 - (view) (annotate) - [select for diffs]
Modified Fri Mar 23 11:46:10 2007 UTC (2 years, 8 months ago) by jorton
File length: 27499 byte(s)
Diff to previous 467442 (colored)
* server/core_filters.c (ap_core_output_filter): Fail quickly with
APR_ECONNABORTED if the c->aborted flag is already set.

PR: 39605

Revision 467442 - (view) (annotate) - [select for diffs]
Modified Tue Oct 24 19:06:10 2006 UTC (3 years, 1 month ago) by minfrin
File length: 27333 byte(s)
Diff to previous 462580 (colored)
Fix a typo.

Revision 462580 - (view) (annotate) - [select for diffs]
Modified Tue Oct 10 21:31:36 2006 UTC (3 years, 1 month ago) by minfrin
File length: 27333 byte(s)
Diff to previous 425571 (colored)
sendfile_nonblocking() takes the _brigade_ as an argument, gets
the first bucket from the brigade, finds it not to be a FILE
bucket and barfs. The fix is to pass a bucket rather than a brigade.


Revision 425571 - (view) (annotate) - [select for diffs]
Modified Wed Jul 26 00:40:53 2006 UTC (3 years, 4 months ago) by fielding
File length: 27283 byte(s)
Diff to previous 420983 (colored)
Fix warning on Darwin 8.7.0 (OS X 10.4.7) due to the prototype for
sendfile_nonblocking being declared outside ifdefs even though the
function is defined and used only when APR_HAS_SENDFILE


Revision 420983 - (view) (annotate) - [select for diffs]
Modified Tue Jul 11 20:33:53 2006 UTC (3 years, 4 months ago) by fielding
File length: 27255 byte(s)
Diff to previous 395228 (colored)
update license header text

Revision 395228 - (view) (annotate) - [select for diffs]
Modified Wed Apr 19 12:11:27 2006 UTC (3 years, 7 months ago) by colm
File length: 27108 byte(s)
Diff to previous 366278 (colored)
Update the copyright year in all .c, .h and .xml files

Revision 366278 - (view) (annotate) - [select for diffs]
Modified Thu Jan 5 20:56:43 2006 UTC (3 years, 10 months ago) by rpluem
File length: 27108 byte(s)
Diff to previous 357519 (colored)
* Fix a regression from 2.2.x: Set c->aborted to 1 if the return code from
  writing to the client is different from APR_SUCCESS in the blocking case or
  APR_SUCCESS or APR_EAGAIN in the non blocking case.

Revision 357519 - (view) (annotate) - [select for diffs]
Modified Sun Dec 18 22:09:05 2005 UTC (3 years, 11 months ago) by rpluem
File length: 26716 byte(s)
Diff to previous 357461 (colored)
* Move code for broken backend detection out of core filter into a new http
  protocol filter (ap_http_broken_backend_filter) that is only run in the
  proxy case.

Revision 357461 - (view) (annotate) - [select for diffs]
Modified Sun Dec 18 12:07:39 2005 UTC (3 years, 11 months ago) by rpluem
File length: 27197 byte(s)
Diff to previous 351997 (colored)
* If the mod_proxy backend connection broke in the middle of the response,
  then
  - Do not cache it.
  - Signal the client that something went wrong by closing the connection
    and not sending the last-chunk marker if the response was T-E chunked.

server/core_filters.c         : Close the connection to the client by setting
                                c->keepalive to AP_CONN_CLOSE.
modules/http/chunk_filter.c   : Do not send last-chunk marker in the case
                                the backend broke.
modules/proxy/mod_proxy_http.c: Signal that the backend connection broke.
modules/cache/mod_disk_cache.c: Respect r->no_cache for discarding the response


Submitted by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem
Reviewed by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem

Revision 351997 - (view) (annotate) - [select for diffs]
Modified Sat Dec 3 18:22:25 2005 UTC (3 years, 11 months ago) by pquerna
File length: 26716 byte(s)
Diff to previous 343999 (colored)
Only define sendfile_nonblocking if APR_HAS_SENDFILE is true.

Revision 343999 - (view) (annotate) - [select for diffs]
Modified Sun Nov 13 23:15:06 2005 UTC (4 years ago) by trawick
File length: 26687 byte(s)
Diff to previous 332306 (colored)
drop dependency on apr_wait_for_io_or_timeout()

Revision 332306 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:11:44 2005 UTC (4 years ago) by jim
File length: 26312 byte(s)
Diff to previous 329075 (colored)
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines

Revision 329075 - (view) (annotate) - [select for diffs]
Modified Fri Oct 28 03:56:12 2005 UTC (4 years, 1 month ago) by brianp
File length: 26339 byte(s)
Diff to previous 327875 (colored)
Restore the socket timeout after setting it to zero for nonblocking
writes in ap_core_output_filter.  (This fixes the mod_proxy errors
that the new core output filter had been causing.)

Revision 327875 - (view) (annotate) - [select for diffs]
Modified Sun Oct 23 23:04:45 2005 UTC (4 years, 1 month ago) by brianp
File length: 25851 byte(s)
Diff to previous 327872 (colored)
remove debugging code

Revision 327872 - (view) (annotate) - [select for diffs]
Modified Sun Oct 23 22:38:35 2005 UTC (4 years, 1 month ago) by brianp
File length: 25881 byte(s)
Diff to previous 306495 (colored)
New version of ap_core_output_filter that does nonblocking writes
(backport from async-dev branch to 2.3 trunk)

Revision 306495 - (view) (annotate) - [select for diffs]
Modified Thu Oct 6 01:29:42 2005 UTC (4 years, 1 month ago) by wrowe
File length: 33446 byte(s)
Diff to previous 263931 (colored)
  NET_TIME, as a standalone feature, was a horrid idea.

  The core filter will NOT operate correctly across platforms 
  (even between Linux/Solaris) without setting up the conn->timeout,
  so always apply the timeout when establishing the core filter.

  The keep-alive-timeout is entirely an HTTP-ism, and needs to
  move to the http protocol handler.  Note #1; this isn't triggered
  in the event mpm, but the event mpm introspects s->keep_alive_timeout
  directly adding it to the pollset, so this is a non-sequitor.

  Finally, once the headers are read, the named virtual host may
  have a different (more/less permissive) timeout for the remainder
  of the request body.  This http-centric patch picks up that subtle
  detail and can switch to a named-vhost timeout.

Revision 263931 - (view) (annotate) - [select for diffs]
Modified Sun Aug 28 23:03:59 2005 UTC (4 years, 2 months ago) by ianh
File length: 34622 byte(s)
Diff to previous 178341 (colored)
Doxygen fixup / cleanup

submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman


Revision 178341 - (view) (annotate) - [select for diffs]
Modified Wed May 25 01:55:28 2005 UTC (4 years, 6 months ago) by wsanchez
File length: 34607 byte(s)
Diff to previous 161367 (colored)
Commits 160348 and 160352 are obviated by commit 178340 in APR. httpd
should have to deal with EAGAIN on a socket it doesn't know is
non-blocking.

Revision 161367 - (view) (annotate) - [select for diffs]
Modified Thu Apr 14 23:42:11 2005 UTC (4 years, 7 months ago) by pquerna
File length: 34731 byte(s)
Diff to previous 160352 (colored)
BRIGADE_NORMALIZE could produce invalid results with 0 length buckets.

Submitted By: Rici Lake

Revision 160352 - (view) (annotate) - [select for diffs]
Modified Thu Apr 7 00:40:27 2005 UTC (4 years, 7 months ago) by wsanchez
File length: 34698 byte(s)
Diff to previous 160348 (colored)
Use APR_STATUS_IS_EAGAIN rather than comparing against APR_EAGAIN.

Revision 160348 - (view) (annotate) - [select for diffs]
Modified Thu Apr 7 00:22:29 2005 UTC (4 years, 7 months ago) by wsanchez
File length: 34690 byte(s)
Diff to previous 154202 (colored)
In emulate_sendfile(), handle APR_EAGAIN from apr_socket_send().

Revision 154202 - (view) (annotate) - [select for diffs]
Modified Thu Feb 17 23:18:27 2005 UTC (4 years, 9 months ago) by pquerna
File length: 34574 byte(s)
Diff to previous 154200 (colored)
Remove unused variable.

Revision 154200 - (view) (annotate) - [select for diffs]
Modified Thu Feb 17 22:53:07 2005 UTC (4 years, 9 months ago) by pquerna
File length: 34609 byte(s)
Diff to previous 151408 (colored)
*) include/httpd.h: Add a brigade for temporary uses in the core input filter context.
*) server/core_filters.c: Do not use brigade_split, since it allocates a new brigade. Instead move buckets to our tmpbb, and reuse the tmpbb for every call.

PR: 33382

Revision 151408 - (view) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (4 years, 9 months ago) by jerenkrantz
File length: 33990 byte(s)
Diff to previous 111594 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.

Revision 111594 - (view) (annotate) - [select for diffs]
Modified Sat Dec 11 09:34:19 2004 UTC (4 years, 11 months ago) by pquerna
File length: 33954 byte(s)
Diff to previous 109498 (colored)
* core_filters.c: If APR_MAX_IOVEC_SIZE is defined, make sure we are under that limit.

Revision 109498 - (view) (annotate) - [select for diffs]
Modified Thu Dec 2 13:28:04 2004 UTC (4 years, 11 months ago) by jorton
File length: 33796 byte(s)
Diff to previous 106692 (colored)
Fix gcc "no previous prototype" warnings after reorganisation:

* server/core_filters.c (ap_core_input_filter, ap_core_output_filter,
ap_net_time_filter): Renamed to add ap_ prefixes for global symbols.

* include/ap_listen.h: Don't export ap_listen_open at all, it's not
used outside server/listen.c any more.

* server/listen.c (open_listeners): Renamed from ap_listen_open.

Revision 106692 - (view) (annotate) - [select for diffs]
Modified Sat Nov 27 08:07:44 2004 UTC (5 years ago) by jerenkrantz
File length: 33803 byte(s)
Copied from: httpd/httpd/trunk/server/core.c revision 106679
Diff to previous 106103 (colored)
Initial pass at refactoring some files to eliminate our 150K C source behemoths.

* Makefile.in: Change order of dependencies to bring in exports.o first so that
  we have every symbol 'used' before the linker starts processing.
* build/rules.mk.in: Add a 'program-install' target which just copies httpd.

* server/Makefile.in, modules/http/config2.m4: Add in new file targets.

* NWGNUmakefile, libhttpd.dsp: Blind updates for Netware and Win32.  (I tried.)

* server/core.c: Move core_input_filter, net_time_filter, and core_output_filter  and all supporting functions to...
* server/core_filters.c (copied): ...here.

* modules/http/http_protocol.c: Move functions from here to there...namely:
* modules/http/byterange_filter.c (copied): Relocate ap_byterange_filter() and
  friends.
* modules/http/chunk_filter.c (copied): Relocate chunk_filter().
* modules/http/http_etag.c (copied): Relocate ap_set_etag and ap_make_etag().
* modules/http/http_filters.c (copied): Relocate ap_http_filter(),
  ap_http_header_filter(), ap_discard_request_body(), ap_setup_client_block(),
  ap_should_client_block(), and ap_get_client_block().

Revision 106103 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (5 years ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 152095 byte(s)
Diff to previous 106075 (colored)
general property cleanup

Revision 106075 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 07:10:32 2004 UTC (5 years ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 152095 byte(s)
Diff to previous 105682 (colored)
  Drop a worthless emit.

Revision 105682 - (view) (annotate) - [select for diffs]
Modified Thu Nov 4 16:04:55 2004 UTC (5 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 152094 byte(s)
Diff to previous 105652 (colored)
remove out-of-date comment...  BillS reports that
AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK provides the
necessary capability to the MPM

Submitted by:	stoddard a.k.a. BillS a.k.a. FirstBill

Revision 105652 - (view) (annotate) - [select for diffs]
Modified Mon Nov 1 13:06:51 2004 UTC (5 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 152330 byte(s)
Diff to previous 105625 (colored)
Change core connection handling so that a connection-oriented
error disabling nagle* is logged with the client IP address and
a debug log level.  We filter out not-implemented errors from
platforms which don't support TCP_NODELAY.

*This is typically EINVAL, which means that the client already
dropped the connection.

Also, mention an earlier change to include the client IP address
when logging connection-oriented errors.

Revision 105625 - (view) (annotate) - [select for diffs]
Modified Fri Oct 29 14:45:24 2004 UTC (5 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 151608 byte(s)
Diff to previous 105572 (colored)
add ap_log_cerror(); use it in a couple of places in core output filter
so that the client IP address is recorded in the log

Revision 105572 - (view) (annotate) - [select for diffs]
Modified Sat Oct 23 22:39:53 2004 UTC (5 years, 1 month ago) by fielding
Original Path: httpd/httpd/trunk/server/core.c
File length: 151629 byte(s)
Diff to previous 105545 (colored)
veto and revert win64 patch: 64bit changes must percolate from the
bottom (APR/system) up -- we can't give the client a 64bit API and
then cast it to 32bits internally without introducing security holes
on other platforms.

Revision 105545 - (view) (annotate) - [select for diffs]
Modified Fri Oct 22 15:22:05 2004 UTC (5 years, 1 month ago) by ake
Original Path: httpd/httpd/trunk/server/core.c
File length: 151821 byte(s)
Diff to previous 105257 (colored)
WIN64: API changes to clean up Windows 64bit compile warnings

Revision 105257 - (view) (annotate) - [select for diffs]
Modified Wed Sep 22 18:21:30 2004 UTC (5 years, 2 months ago) by ake
Original Path: httpd/httpd/trunk/server/core.c
File length: 151629 byte(s)
Diff to previous 105215 (colored)
WIN64: first in a series to get Windows IA64 builds clean, this serves pages

Revision 105215 - (view) (annotate) - [select for diffs]
Modified Mon Sep 20 20:12:20 2004 UTC (5 years, 2 months ago) by jorton
Original Path: httpd/httpd/trunk/server/core.c
File length: 151625 byte(s)
Diff to previous 105112 (colored)
* server/core.c (merge_core_dir_configs): Fix Satisfy merging since
per-method Satisfy feature was added.

PR: 31315
Submitted by: Rici Lake <rici ricilake.net>

Revision 105112 - (view) (annotate) - [select for diffs]
Modified Mon Sep 13 13:19:10 2004 UTC (5 years, 2 months ago) by jorton
Original Path: httpd/httpd/trunk/server/core.c
File length: 151436 byte(s)
Diff to previous 105111 (colored)
Fix typo in previous commit.

Revision 105111 - (view) (annotate) - [select for diffs]
Modified Mon Sep 13 13:16:32 2004 UTC (5 years, 2 months ago) by jorton
Original Path: httpd/httpd/trunk/server/core.c
File length: 151437 byte(s)
Diff to previous 104313 (colored)
* server/core.c (default_handler): Fix the test for whether to split a
file into several buckets: it is needed regardless of whether sendfile
is enabled, and APR_HAS_LARGE_FILES is not sufficient to determine
whether sizeof(apr_off_t) is greater than sizeof(apr_off_t).

PR: 28898

Revision 104313 - (view) (annotate) - [select for diffs]
Modified Sat Jul 17 08:29:48 2004 UTC (5 years, 4 months ago) by jorton
Original Path: httpd/httpd/trunk/server/core.c
File length: 151538 byte(s)
Diff to previous 104305 (colored)
* server/core.c (set_allow_opts): Fix gcc warning.

Revision 104305 - (view) (annotate) - [select for diffs]
Modified Fri Jul 16 16:12:22 2004 UTC (5 years, 4 months ago) by bnicholes
Original Path: httpd/httpd/trunk/server/core.c
File length: 151528 byte(s)
Diff to previous 104283 (colored)
Replace the strsep() call to the more portable apr_strtok() call so that we can build again

Revision 104283 - (view) (annotate) - [select for diffs]
Modified Wed Jul 14 06:36:42 2004 UTC (5 years, 4 months ago) by pquerna
Original Path: httpd/httpd/trunk/server/core.c
File length: 151514 byte(s)
Diff to previous 103849 (colored)
Added 'AllowOverride Options=Indexes,MultiViews' to give an admin better
control over what options can be used in .htaccess files.

PR: 29310
Submitted by: Tom Alsberg <alsbergt-apache cs.huji.ac.il>

Revision 103849 - (view) (annotate) - [select for diffs]
Modified Fri Jun 4 22:40:47 2004 UTC (5 years, 5 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 149490 byte(s)
Diff to previous 103751 (colored)
Nobody objected:
<IfModule> now takes the module identifier in addition to the
filename.

CAUTION: this commit breaks the build on netware. It still needs
to be adjusted. (but I don't have any netware knowledge...)
Also, developers need to re-run buildconf on unices.

PR: 29003
Submitted by: Edward Rudd <eddie omegaware.com>, Andr� Malo

Revision 103751 - (view) (annotate) - [select for diffs]
Modified Tue May 25 00:10:25 2004 UTC (5 years, 6 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 148838 byte(s)
Diff to previous 103750 (colored)
allow LimitRequestBody to be reset to unlimited

PR: 29106

Revision 103750 - (view) (annotate) - [select for diffs]
Modified Mon May 24 22:55:08 2004 UTC (5 years, 6 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 148538 byte(s)
Diff to previous 103686 (colored)
use new apr_strtoff function to parse limitrequestbody

Revision 103686 - (view) (annotate) - [select for diffs]
Modified Mon May 17 15:24:31 2004 UTC (5 years, 6 months ago) by jorton
Original Path: httpd/httpd/trunk/server/core.c
File length: 148647 byte(s)
Diff to previous 103517 (colored)
* server/core.c (core_output_filter): Don't explicitly delete the EOC
bucket, and don't buffer the brigade if it ends in an EOC.

Revision 103517 - (view) (annotate) - [select for diffs]
Modified Sun Apr 25 17:23:31 2004 UTC (5 years, 7 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 148621 byte(s)
Diff to previous 103466 (colored)
changed the following APIs to return an error instead of hard exiting:
ap_add_module, ap_add_loaded_module, ap_setup_prelinked_modules,
and ap_process_resource_config

Revision 103466 - (view) (annotate) - [select for diffs]
Modified Tue Apr 20 20:22:13 2004 UTC (5 years, 7 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 148527 byte(s)
Diff to previous 103339 (colored)
Recursive Include directives no longer crash. The server stops
including configuration files after a certain nesting level (128
as distributed). This is configurable at compile time using the
-DAP_MAX_INCLUDE_DEPTH switch.

PR: 28370

Revision 103339 - (view) (annotate) - [select for diffs]
Modified Sat Apr 10 21:44:43 2004 UTC (5 years, 7 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 147659 byte(s)
Diff to previous 103333 (colored)
accept URLs as ServerAdmin contact. If it's not recognized as an URL, assume
an email address and prepend it with mailto: in server outputs.

PR: 28174

Revision 103333 - (view) (annotate) - [select for diffs]
Modified Sat Apr 10 18:40:53 2004 UTC (5 years, 7 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 147534 byte(s)
Diff to previous 103328 (colored)
"ErrorDocument default" changes broke inheritance. consider:

<Directory /foo>
ErrorDocument 404 blah
</Directory>
<DIrectory /foo/bar>
ErrorDocument 500 boo
# 404 is now fallen back to default
</Directory>

This patch solves the problem.

Revision 103328 - (view) (annotate) - [select for diffs]
Modified Sat Apr 10 13:57:39 2004 UTC (5 years, 7 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 147244 byte(s)
Diff to previous 103310 (colored)
Fix a bunch of cases where the return code of the regex compiler
was not checked properly. This affects: mod_setenvif, mod_usertrack,
mod_proxy, mod_proxy_ftp and core.

PR: 28218

Revision 103310 - (view) (annotate) - [select for diffs]
Modified Fri Apr 9 00:56:26 2004 UTC (5 years, 7 months ago) by geoff
Original Path: httpd/httpd/trunk/server/core.c
File length: 146776 byte(s)
Diff to previous 103153 (colored)
Enable special ErrorDocument value 'default' which restores the
canned server response for the scope of the directive.

Revision 103153 - (view) (annotate) - [select for diffs]
Modified Thu Mar 25 14:27:27 2004 UTC (5 years, 8 months ago) by jorton
Original Path: httpd/httpd/trunk/server/core.c
File length: 146555 byte(s)
Diff to previous 103125 (colored)
* server/core.c (core_output_filter): Tag the deferred_write pool.

Revision 103125 - (view) (annotate) - [select for diffs]
Modified Wed Mar 24 19:57:06 2004 UTC (5 years, 8 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 146481 byte(s)
Diff to previous 103120 (colored)
Can't assume the filepointer is really 0 when offset is 0. A handler can create brigades containing multiple file buckets with arbitrary offsets

Revision 103120 - (view) (annotate) - [select for diffs]
Modified Wed Mar 24 02:53:35 2004 UTC (5 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 146481 byte(s)
Diff to previous 102975 (colored)
Fix memory corruption problem with ap_custom_response() function.
The core per-dir config would later point to request pool data
that would be reused for different purposes on different requests.

This is based on an old 1.3 patch submitted by Will Lowe.
It needs a minor tweak before committing to 1.3, but he had
it pretty darn close.

Revision 102975 - (view) (annotate) - [select for diffs]
Modified Mon Mar 15 23:08:41 2004 UTC (5 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 145980 byte(s)
Diff to previous 102954 (colored)
use existing directive name ThreadStackSize instead of
WorkerStackSize

as made obvious by: Brad Nicholes

Revision 102954 - (view) (annotate) - [select for diffs]
Modified Sun Mar 14 16:24:55 2004 UTC (5 years, 8 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 145980 byte(s)
Diff to previous 102931 (colored)
Satisfy directives now can be influenced by a surrounding <Limit>
container.

PR: 14726.

Revision 102931 - (view) (annotate) - [select for diffs]
Modified Thu Mar 11 03:57:50 2004 UTC (5 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 145590 byte(s)
Diff to previous 102840 (colored)
Threaded MPMs for Unix and Win32: Add WorkerStackSize directive
to override default thread stack size for threads which handle
client connections.  Required for some third-party modules on
platforms with small default thread stack size.

This is also useful for trimming back the stack size on
platforms with relatively large default stack size in order to
conserve address space for supporting more threads per child.

Revision 102840 - (view) (annotate) - [select for diffs]
Modified Mon Mar 1 21:40:44 2004 UTC (5 years, 8 months ago) by rederpj
Original Path: httpd/httpd/trunk/server/core.c
File length: 145386 byte(s)
Diff to previous 102818 (colored)

 *) Remove compile-time length limit on request strings. Length is
    now enforced solely with the LimitRequestLine config directive.
    [Paul J. Reder]

Revision 102818 - (view) (annotate) - [select for diffs]
Modified Sun Feb 29 00:25:48 2004 UTC (5 years, 8 months ago) by jorton
Original Path: httpd/httpd/trunk/server/core.c
File length: 145647 byte(s)
Diff to previous 102793 (colored)
* server/core.c (core_output_filter): Avoid using EOC bucket after
deleting it.

Revision 102793 - (view) (annotate) - [select for diffs]
Modified Sat Feb 28 00:45:26 2004 UTC (5 years, 9 months ago) by madhum
Original Path: httpd/httpd/trunk/server/core.c
File length: 145642 byte(s)
Diff to previous 102686 (colored)
Send the 'Close Alert' message to the peer upon closing a SSL session. This
required creating a new EOC (End-Of-Connection) bucket type to notify mod_ssl
that the connection is about to be closed.


Reviewed by: Joe Orton, Justin Erenkrantz

Revision 102686 - (view) (annotate) - [select for diffs]
Modified Thu Feb 19 11:19:43 2004 UTC (5 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 145551 byte(s)
Diff to previous 102619 (colored)
Add a new directive EnableExceptionHook that must be specified for
exception hooks to be called (in addition to the build time
requirements).

The 2.1-dev feature is now more aligned with the 1.3.30-dev feature,
in that there is a build-time requirement as well as a configuration
requirement.

Revision 102619 - (view) (annotate) - [select for diffs]
Modified Mon Feb 9 20:40:53 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 145356 byte(s)
Diff to previous 102589 (colored)
fix name of The Apache Software Foundation

Revision 102589 - (view) (annotate) - [select for diffs]
Modified Sun Feb 8 13:58:22 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 145352 byte(s)
Diff to previous 102525 (colored)
fix copyright dates according to the first check in

Revision 102525 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 145352 byte(s)
Diff to previous 102405 (colored)
apply Apache License, Version 2.0

Revision 102405 - (view) (annotate) - [select for diffs]
Modified Sun Jan 25 22:03:38 2004 UTC (5 years, 10 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 147571 byte(s)
Diff to previous 102233 (colored)
Add core version query function ap_get_server_revision and
accompanying ap_version_t structure (minor MMN bump).
The function is similar to apr_version() and allow for exact
querying of the core revision level.

Revision 102233 - (view) (annotate) - [select for diffs]
Modified Thu Jan 8 18:56:20 2004 UTC (5 years, 10 months ago) by bnicholes
Original Path: httpd/httpd/trunk/server/core.c
File length: 147301 byte(s)
Diff to previous 102231 (colored)
Oops, fixed a bit too much

Revision 102231 - (view) (annotate) - [select for diffs]
Modified Thu Jan 8 17:50:03 2004 UTC (5 years, 10 months ago) by bnicholes
Original Path: httpd/httpd/trunk/server/core.c
File length: 147301 byte(s)
Diff to previous 102135 (colored)
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.

Revision 102135 - (view) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (5 years, 10 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 147274 byte(s)
Diff to previous 102021 (colored)
update license to 2004.

Revision 102021 - (view) (annotate) - [select for diffs]
Modified Wed Dec 10 22:40:33 2003 UTC (5 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 147274 byte(s)
Diff to previous 101832 (colored)
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

Revision 101832 - (view) (annotate) - [select for diffs]
Modified Fri Nov 21 15:02:04 2003 UTC (6 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 147126 byte(s)
Diff to previous 101829 (colored)
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.

Revision 101829 - (view) (annotate) - [select for diffs]
Modified Fri Nov 21 03:29:11 2003 UTC (6 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 147201 byte(s)
Diff to previous 101828 (colored)
axe a comment... as with so many things, the true part isn't
interesting and the interesting part isn't true

Revision 101828 - (view) (annotate) - [select for diffs]
Modified Fri Nov 21 03:26:14 2003 UTC (6 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 147376 byte(s)
Diff to previous 101788 (colored)
simplify just a bit

Revision 101788 - (view) (annotate) - [select for diffs]
Modified Sun Nov 16 02:09:14 2003 UTC (6 years ago) by jwoolley
Original Path: httpd/httpd/trunk/server/core.c
File length: 147386 byte(s)
Diff to previous 101774 (colored)
get rid of _FOREACH

Revision 101774 - (view) (annotate) - [select for diffs]
Modified Thu Nov 13 15:18:35 2003 UTC (6 years ago) by jim
Original Path: httpd/httpd/trunk/server/core.c
File length: 147182 byte(s)
Diff to previous 101519 (colored)
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:

Revision 101519 - (view) (annotate) - [select for diffs]
Modified Wed Oct 22 17:07:26 2003 UTC (6 years, 1 month ago) by bnicholes
Original Path: httpd/httpd/trunk/server/core.c
File length: 147178 byte(s)
Diff to previous 101356 (colored)
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().

Revision 101356 - (view) (annotate) - [select for diffs]
Modified Tue Sep 30 09:30:06 2003 UTC (6 years, 1 month ago) by martin
Original Path: httpd/httpd/trunk/server/core.c
File length: 147095 byte(s)
Diff to previous 101311 (colored)
Cosmetics: remove redundancy

Revision 101311 - (view) (annotate) - [select for diffs]
Modified Thu Sep 25 20:50:26 2003 UTC (6 years, 2 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 147219 byte(s)
Diff to previous 101310 (colored)
change some error log messages to be more concise

Submitted by:	Bill Rowe

Revision 101310 - (view) (annotate) - [select for diffs]
Modified Thu Sep 25 16:00:56 2003 UTC (6 years, 2 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 147261 byte(s)
Diff to previous 101154 (colored)
Log an error when requests for URIs which fail to map to a valid
filesystem name are rejected with 403.

Revision 101154 - (view) (annotate) - [select for diffs]
Modified Wed Sep 3 19:27:12 2003 UTC (6 years, 2 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 146914 byte(s)
Diff to previous 101061 (colored)
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

Revision 101061 - (view) (annotate) - [select for diffs]
Modified Fri Aug 22 20:57:32 2003 UTC (6 years, 3 months ago) by stas
Original Path: httpd/httpd/trunk/server/core.c
File length: 146879 byte(s)
Diff to previous 100763 (colored)
fix doc typo
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 100763 - (view) (annotate) - [select for diffs]
Modified Thu Jul 24 15:26:56 2003 UTC (6 years, 4 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 146880 byte(s)
Diff to previous 100760 (colored)
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

Revision 100760 - (view) (annotate) - [select for diffs]
Modified Thu Jul 24 14:36:54 2003 UTC (6 years, 4 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 146946 byte(s)
Diff to previous 100315 (colored)
don't reverse the filter order in AddOutputFilterByType

Revision 100315 - (view) (annotate) - [select for diffs]
Modified Fri Jun 20 12:53:52 2003 UTC (6 years, 5 months ago) by martin
Original Path: httpd/httpd/trunk/server/core.c
File length: 146751 byte(s)
Diff to previous 100210 (colored)
DocumentRoot always used to be interpreted relative to ServerRoot. Make it server_root_relative like in Apache-1.3

Revision 100210 - (view) (annotate) - [select for diffs]
Modified Wed Jun 11 17:46:25 2003 UTC (6 years, 5 months ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 146707 byte(s)
Diff to previous 100095 (colored)
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>

Revision 100095 - (view) (annotate) - [select for diffs]
Modified Thu May 29 23:04:32 2003 UTC (6 years, 6 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 146637 byte(s)
Diff to previous 99911 (colored)
Rework of the recursion stopper - collapse recursion counters into one function

Reviewed by: Justin Erenkrantz

Revision 99911 - (view) (annotate) - [select for diffs]
Modified Mon May 19 01:19:55 2003 UTC (6 years, 6 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 146761 byte(s)
Diff to previous 99776 (colored)
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)

Revision 99776 - (view) (annotate) - [select for diffs]
Modified Tue May 13 14:22:45 2003 UTC (6 years, 6 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 142002 byte(s)
Diff to previous 99747 (colored)
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

Revision 99747 - (view) (annotate) - [select for diffs]
Modified Fri May 9 21:37:06 2003 UTC (6 years, 6 months ago) by martin
Original Path: httpd/httpd/trunk/server/core.c
File length: 142005 byte(s)
Diff to previous 99695 (colored)
Porting to BS2000: the antique interface (BS2000Account) no longer exists

Revision 99695 - (view) (annotate) - [select for diffs]
Modified Fri May 2 21:50:55 2003 UTC (6 years, 6 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 142463 byte(s)
Diff to previous 99517 (colored)
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

Revision 99517 - (view) (annotate) - [select for diffs]
Modified Tue Apr 22 14:51:42 2003 UTC (6 years, 7 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 142150 byte(s)
Diff to previous 98573 (colored)
Fix ap_construct_url() so that it surrounds IPv6 literal address
strings with [].  This fixes certain types of redirection.

PR:             19207

Revision 98573 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (6 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 141625 byte(s)
Diff to previous 98479 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))

Revision 98479 - (view) (annotate) - [select for diffs]
Modified Thu Jan 23 21:34:13 2003 UTC (6 years, 10 months ago) by coar
Original Path: httpd/httpd/trunk/server/core.c
File length: 141625 byte(s)
Diff to previous 98320 (colored)
	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.

Revision 98320 - (view) (annotate) - [select for diffs]
Modified Sat Jan 18 03:37:55 2003 UTC (6 years, 10 months ago) by nd
Original Path: httpd/httpd/trunk/server/core.c
File length: 141123 byte(s)
Diff to previous 98265 (colored)
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

Revision 98265 - (view) (annotate) - [select for diffs]
Modified Tue Jan 14 17:01:32 2003 UTC (6 years, 10 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 141783 byte(s)
Diff to previous 98260 (colored)
  With the latest patch to config.c wildcards now work.

Revision 98260 - (view) (annotate) - [select for diffs]
Modified Tue Jan 14 03:01:52 2003 UTC (6 years, 10 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 141870 byte(s)
Diff to previous 97824 (colored)
  Once again, allow <Directory "C:\Users\*\html_files"> or other wildcard
  patterns in Directory blocks.  Note a similar problem with Includes *.conf

Revision 97824 - (view) (annotate) - [select for diffs]
Modified Mon Dec 9 22:19:26 2002 UTC (6 years, 11 months ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 141720 byte(s)
Diff to previous 97539 (colored)
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

Revision 97539 - (view) (annotate) - [select for diffs]
Modified Sat Nov 16 02:27:33 2002 UTC (7 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 140601 byte(s)
Diff to previous 97503 (colored)
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

Revision 97503 - (view) (annotate) - [select for diffs]
Modified Wed Nov 13 15:07:35 2002 UTC (7 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 141762 byte(s)
Diff to previous 97488 (colored)
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.

Revision 97488 - (view) (annotate) - [select for diffs]
Modified Mon Nov 11 21:08:26 2002 UTC (7 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 141956 byte(s)
Diff to previous 97484 (colored)
can't mix declarations and statements except with gcc 3.2 :)
(or possibly RedHat 8's patches to it)

Revision 97484 - (view) (annotate) - [select for diffs]
Modified Mon Nov 11 19:57:58 2002 UTC (7 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 141956 byte(s)
Diff to previous 97463 (colored)
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.

Revision 97463 - (view) (annotate) - [select for diffs]
Modified Fri Nov 8 19:20:04 2002 UTC (7 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 141023 byte(s)
Diff to previous 97462 (colored)
core_output_filter: straighten out the parens for the decision to set aside.

Pointed out by: gcc and Jeff Trawick

Revision 97462 - (view) (annotate) - [select for diffs]
Modified Fri Nov 8 17:19:10 2002 UTC (7 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 141021 byte(s)
Diff to previous 97459 (colored)
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.

Revision 97459 - (view) (annotate) - [select for diffs]
Modified Fri Nov 8 13:17:09 2002 UTC (7 years ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 140588 byte(s)
Diff to previous 97431 (colored)
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 ||

Revision 97431 - (view) (annotate) - [select for diffs]
Modified Wed Nov 6 19:34:51 2002 UTC (7 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 140588 byte(s)
Diff to previous 97416 (colored)
no functional change...factor out a common subexpression

Revision 97416 - (view) (annotate) - [select for diffs]
Modified Wed Nov 6 01:55:15 2002 UTC (7 years ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 140649 byte(s)
Diff to previous 97390 (colored)
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

Revision 97390 - (view) (annotate) - [select for diffs]
Modified Mon Nov 4 15:15:09 2002 UTC (7 years ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 140613 byte(s)
Diff to previous 97301 (colored)
Small performance tweaks to net_time_filter and core_input_filter.

Revision 97301 - (view) (annotate) - [select for diffs]
Modified Fri Oct 25 15:18:53 2002 UTC (7 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 140377 byte(s)
Diff to previous 97300 (colored)
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

Revision 97300 - (view) (annotate) - [select for diffs]
Modified Fri Oct 25 06:52:02 2002 UTC (7 years, 1 month ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 139929 byte(s)
Diff to previous 97211 (colored)
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

Revision 97211 - (view) (annotate) - [select for diffs]
Modified Mon Oct 14 20:08:15 2002 UTC (7 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 139079 byte(s)
Diff to previous 97205 (colored)
  Use a better name for the APR_SENDFILE_ENABLE flag.

Revision 97205 - (view) (annotate) - [select for diffs]
Modified Mon Oct 14 17:42:45 2002 UTC (7 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 139082 byte(s)
Diff to previous 97192 (colored)
  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.

Revision 97192 - (view) (annotate) - [select for diffs]
Modified Sun Oct 13 18:22:55 2002 UTC (7 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 138168 byte(s)
Diff to previous 97065 (colored)
  What once were macros no longer need line continuation

Revision 97065 - (view) (annotate) - [select for diffs]
Modified Thu Oct 3 00:16:47 2002 UTC (7 years, 1 month ago) by gstein
Original Path: httpd/httpd/trunk/server/core.c
File length: 138180 byte(s)
Diff to previous 97064 (colored)
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.

Revision 97064 - (view) (annotate) - [select for diffs]
Modified Wed Oct 2 21:35:57 2002 UTC (7 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 137060 byte(s)
Diff to previous 97063 (colored)
  *) 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]

Revision 97063 - (view) (annotate) - [select for diffs]
Modified Wed Oct 2 21:32:01 2002 UTC (7 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 136937 byte(s)
Diff to previous 97046 (colored)
  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.

Revision 97046 - (view) (annotate) - [select for diffs]
Modified Tue Oct 1 16:24:41 2002 UTC (7 years, 1 month ago) by gstein
Original Path: httpd/httpd/trunk/server/core.c
File length: 137271 byte(s)
Diff to previous 97038 (colored)
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.

Revision 97038 - (view) (annotate) - [select for diffs]
Modified Mon Sep 30 23:43:18 2002 UTC (7 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 136937 byte(s)
Diff to previous 96836 (colored)
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>

Revision 96836 - (view) (annotate) - [select for diffs]
Modified Mon Sep 16 13:11:55 2002 UTC (7 years, 2 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 136966 byte(s)
Diff to previous 96829 (colored)
zap a gcc warning about using an uninitialized variable (new) and
check for a possible syntax error

Revision 96829 - (view) (annotate) - [select for diffs]
Modified Sun Sep 15 22:04:01 2002 UTC (7 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 136857 byte(s)
Diff to previous 96819 (colored)
  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.

Revision 96819 - (view) (annotate) - [select for diffs]
Modified Sun Sep 15 00:30:56 2002 UTC (7 years, 2 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 136997 byte(s)
Diff to previous 96752 (colored)
Allow AddOutputFilterByType to take in multiple filters.

Revision 96752 - (view) (annotate) - [select for diffs]
Modified Tue Sep 10 19:41:43 2002 UTC (7 years, 2 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 136853 byte(s)
Diff to previous 96501 (colored)
Fix memory leak in core_output_filter.

This would result in at least two EOS buckets being leaked per connection.

Revision 96501 - (view) (annotate) - [select for diffs]
Modified Fri Aug 23 18:05:38 2002 UTC (7 years, 3 months ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 136853 byte(s)
Diff to previous 96500 (colored)
Major/Minor/Min[imal]
now working as one (with a sane mind) would thing it should

Revision 96500 - (view) (annotate) - [select for diffs]
Modified Fri Aug 23 17:24:39 2002 UTC (7 years, 3 months ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 136590 byte(s)
Diff to previous 96431 (colored)
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

Revision 96431 - (view) (annotate) - [select for diffs]
Modified Sun Aug 18 07:16:01 2002 UTC (7 years, 3 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 136284 byte(s)
Diff to previous 96316 (colored)
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)

Revision 96316 - (view) (annotate) - [select for diffs]
Modified Tue Aug 6 20:02:07 2002 UTC (7 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 136387 byte(s)
Diff to previous 96314 (colored)
  Pardon je, it seems the most obvious solutions are always the easiest
  to incorporate new bugs.  Solve the 0index.html bad uri bug.

Revision 96314 - (view) (annotate) - [select for diffs]
Modified Tue Aug 6 16:27:36 2002 UTC (7 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 136389 byte(s)
Diff to previous 96303 (colored)
  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

Revision 96303 - (view) (annotate) - [select for diffs]
Modified Sun Aug 4 15:15:57 2002 UTC (7 years, 3 months ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 136037 byte(s)
Diff to previous 96055 (colored)
format to 80 chars

Revision 96055 - (view) (annotate) - [select for diffs]
Modified Mon Jul 15 07:46:19 2002 UTC (7 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 136039 byte(s)
Diff to previous 95991 (colored)
  Timeout/time fixes

Revision 95991 - (view) (annotate) - [select for diffs]
Modified Wed Jul 10 01:07:21 2002 UTC (7 years, 4 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 136081 byte(s)
Diff to previous 95976 (colored)
spell check a comment

Revision 95976 - (view) (annotate) - [select for diffs]
Modified Mon Jul 8 17:43:34 2002 UTC (7 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 136082 byte(s)
Diff to previous 95966 (colored)
  Changes for deprecated apr_is_fnmatch

Revision 95966 - (view) (annotate) - [select for diffs]
Modified Sat Jul 6 20:04:38 2002 UTC (7 years, 4 months ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 136076 byte(s)
Diff to previous 95954 (colored)
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:

Revision 95954 - (view) (annotate) - [select for diffs]
Modified Thu Jul 4 15:20:54 2002 UTC (7 years, 4 months ago) by striker
Original Path: httpd/httpd/trunk/server/core.c
File length: 136076 byte(s)
Diff to previous 95941 (colored)
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.

Revision 95941 - (view) (annotate) - [select for diffs]
Modified Tue Jul 2 21:40:13 2002 UTC (7 years, 4 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 135876 byte(s)
Diff to previous 95940 (colored)
Optimized the addition of the core output filter

Revision 95940 - (view) (annotate) - [select for diffs]
Modified Tue Jul 2 21:35:19 2002 UTC (7 years, 4 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 135847 byte(s)
Diff to previous 95906 (colored)
Replaced ap_add_input_filter() call with cheaper ap_add_input_filter_handle()

Revision 95906 - (view) (annotate) - [select for diffs]
Modified Fri Jun 28 08:40:25 2002 UTC (7 years, 5 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 135822 byte(s)
Diff to previous 95897 (colored)
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

Revision 95897 - (view) (annotate) - [select for diffs]
Modified Thu Jun 27 05:18:19 2002 UTC (7 years, 5 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 135779 byte(s)
Diff to previous 95896 (colored)
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

Revision 95896 - (view) (annotate) - [select for diffs]
Modified Thu Jun 27 05:00:23 2002 UTC (7 years, 5 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 135835 byte(s)
Diff to previous 95891 (colored)
- 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.

Revision 95891 - (view) (annotate) - [select for diffs]
Modified Wed Jun 26 19:45:07 2002 UTC (7 years, 5 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 135692 byte(s)
Diff to previous 95690 (colored)
Change conn_rec->keepalive to an enumerated value of

AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE

This also fixes a problem where ap_discard_request_body would not discard
the body when keepalive was 0.  This actually meant the keepalive status
was unknown *not* closed, but no one ever remembered that.

This problem was seen with mod_dav sending error responses (as reported by
Karl Fogel).

Suggested by:	Greg "this isn't the '80s" Stein
Reviewed by:	Greg Ames

Revision 95690 - (view) (annotate) - [select for diffs]
Modified Sat Jun 15 05:49:06 2002 UTC (7 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 135623 byte(s)
Diff to previous 95623 (colored)
Make the default_handler catch all requests that aren't served by
another handler.  This also gets us to return a 404 if a directory
is requested, there is no DirectoryIndex, and mod_autoindex isn't
loaded.

PR:	8045
Submitted by:	Justin Erenkrantz

Revision 95623 - (view) (annotate) - [select for diffs]
Modified Wed Jun 12 23:59:31 2002 UTC (7 years, 5 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 135821 byte(s)
Diff to previous 95454 (colored)
  Solve the 80/20 by initializing and storing server_rec->timeout and
  server_rec->keep_alive_timeout in apr_time_interval_t format (in apr
  units, whatever they be), as both values exist to pass into APR, and
  all APR timeouts are in apr_time_t.

Reviewed by:	Cliff Woolley

Revision 95454 - (view) (annotate) - [select for diffs]
Modified Fri May 31 20:52:28 2002 UTC (7 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 135851 byte(s)
Diff to previous 95171 (colored)
The apr_bucket change requires a minor MMN bump.  Also modify Apache's
filters to use APR_BUCKET_IS_METADATA macro.

Revision 95171 - (view) (annotate) - [select for diffs]
Modified Sat May 18 17:22:23 2002 UTC (7 years, 6 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 135821 byte(s)
Diff to previous 95170 (colored)
  Resolve the EXEC_ON_READ bit for ServerRoot and other modules that test
  the directive context.  Should eliminate the segfault.

Revision 95170 - (view) (annotate) - [select for diffs]
Modified Sat May 18 16:35:57 2002 UTC (7 years, 6 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 135548 byte(s)
Diff to previous 95164 (colored)
  Although it appears reasonable to immediately gather the Error log and
  level from the config; these are per-vhost entities that can't be
  processed as we preload the config tree.  There is more work to do,
  as Cliff Woolley guesses, before we can make this change.
  In the meantime, -e and -E should provide the admin sufficient options
  to work around problematic configs.  So I'm reverting those changes,
  for now.

  ServerRoot is global only, and it MUST be read immediately, so that
  part of the last patch stays.

Revision 95164 - (view) (annotate) - [select for diffs]
Modified Sat May 18 04:13:13 2002 UTC (7 years, 6 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/core.c
File length: 135578 byte(s)
Diff to previous 95160 (colored)
Renames:
  APR_XtOffset   -> APR_OFFSET
  APR_XtOffsetOf -> APR_OFFSETOF

Revision 95160 - (view) (annotate) - [select for diffs]
Modified Fri May 17 19:34:52 2002 UTC (7 years, 6 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 135607 byte(s)
Diff to previous 95149 (colored)
  We need to grab ServerRoot, LogLevel, and ErrorLog right off the bat
  as we are reading the config.

  This closes a bug where ServerRoot /foo + LoadModule relative/mod_foo.so
  won't load mod_foo.so.

Reported by: Ron Leung <rleung@covalent.net>

Revision 95149 - (view) (annotate) - [select for diffs]
Modified Fri May 17 11:11:39 2002 UTC (7 years, 6 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 135562 byte(s)
Diff to previous 95040 (colored)
stop using APLOG_NOERRNO in calls to ap_log_?error()

Revision 95040 - (view) (annotate) - [select for diffs]
Modified Sat May 11 23:24:29 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 135662 byte(s)
Diff to previous 95031 (colored)
Added EnableMMAP directive to allow the server administrator to
prevent mmap of file buckets upon read.

Revision 95031 - (view) (annotate) - [select for diffs]
Modified Fri May 10 15:08:59 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 134729 byte(s)
Diff to previous 95026 (colored)
Moved ap_setup_make_content_type() declaration to http_protocol.h

Revision 95026 - (view) (annotate) - [select for diffs]
Modified Fri May 10 06:47:13 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 134793 byte(s)
Diff to previous 94882 (colored)
Performance fix: replaced the strcasecmp calls in ap_make_content_type()
with apr_strmatch()

Revision 94882 - (view) (annotate) - [select for diffs]
Modified Tue Apr 30 20:12:26 2002 UTC (7 years, 6 months ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 134690 byte(s)
Diff to previous 94807 (colored)
default_handler: move the code to handle unusual methods out of the middle
of the hot path without using goto.

suggested by: Roy Fielding

Revision 94807 - (view) (annotate) - [select for diffs]
Modified Thu Apr 25 20:51:49 2002 UTC (7 years, 7 months ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 134391 byte(s)
Diff to previous 94781 (colored)
remove a goto

Revision 94781 - (view) (annotate) - [select for diffs]
Modified Wed Apr 24 14:31:28 2002 UTC (7 years, 7 months ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 134400 byte(s)
Diff to previous 94751 (colored)
default_handler: short circuit the method checks.  Move the code to deal
with unusual methods to the end of function to reduce i-cache clutter.

Revision 94751 - (view) (annotate) - [select for diffs]
Modified Mon Apr 22 08:08:38 2002 UTC (7 years, 7 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/core.c
File length: 134359 byte(s)
Diff to previous 94468 (colored)
AcceptPathInfo was totally backwards... it would reject when set to on and
by default and accept when set to off for the default handler, and would
reject only if set to accept for mod_cgi(d) and mod_isapi.

PR: 8234

Revision 94468 - (view) (annotate) - [select for diffs]
Modified Fri Apr 5 20:55:00 2002 UTC (7 years, 7 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 134274 byte(s)
Diff to previous 94304 (colored)
  Correct partitioning of filter handles between core and http, and
  export the handle pointers on Win32.

Revision 94304 - (view) (annotate) - [select for diffs]
Modified Fri Mar 29 08:17:26 2002 UTC (7 years, 8 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/core.c
File length: 134194 byte(s)
Diff to previous 94143 (colored)
BUCKET FREELISTS

Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.

Revision 94143 - (view) (annotate) - [select for diffs]
Modified Fri Mar 22 21:45:44 2002 UTC (7 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 133680 byte(s)
Diff to previous 94062 (colored)
We have to return valid HTTP status codes from filters.  This fixes two
cases in the core_output_filters where there was a problem, and the core
returned an error code instead of an HTTP status code.  This keeps us from
putting status codes like 32 and 104 in the access log.

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

Revision 94062 - (view) (annotate) - [select for diffs]
Modified Wed Mar 20 22:19:11 2002 UTC (7 years, 8 months ago) by jim
Original Path: httpd/httpd/trunk/server/core.c
File length: 133423 byte(s)
Diff to previous 94057 (colored)
Fold the compiled-in knowledge of the allowable AcceptMutex settings into
its help entry. Requires the use of a extern string rather than a function
call for the initialization to be valid in the macro (Thx to Jeff!).
In the meantime, bump down the error logging until we deal with true
default and configured setting information ala 1.3.

PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 94057 - (view) (annotate) - [select for diffs]
Modified Wed Mar 20 17:44:13 2002 UTC (7 years, 8 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 133456 byte(s)
Diff to previous 94028 (colored)
Commit 2 of 2 to:
1. rename ap_rset_content_type to ap_set_content_type
2. reverse the arguments to aligh with ap_set_content_length

Revision 94028 - (view) (annotate) - [select for diffs]
Modified Wed Mar 20 02:05:43 2002 UTC (7 years, 8 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 133457 byte(s)
Diff to previous 93965 (colored)
Final commit to add ap_rset_content_type accessor. Add AddOutputFiltersbyType
filters during call to ap_rset_content_type()

Revision 93965 - (view) (annotate) - [select for diffs]
Modified Sat Mar 16 18:26:58 2002 UTC (7 years, 8 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 133266 byte(s)
Diff to previous 93918 (colored)
  Eliminate potential ap_server_root_relative segfaults, with the input
  of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.

Revision 93918 - (view) (annotate) - [select for diffs]
Modified Wed Mar 13 20:48:07 2002 UTC (7 years, 8 months ago) by fielding
Original Path: httpd/httpd/trunk/server/core.c
File length: 133118 byte(s)
Diff to previous 93756 (colored)
Update our copyright for this year.

Revision 93756 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 09:27:17 2002 UTC (7 years, 8 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 133118 byte(s)
Diff to previous 93745 (colored)
As hinted on dev@httpd, change filter naming schemes to match our
expectations of their usage.

The reason that we should make this change now is that we have changed
the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should
be PROTOCOL while others should be CONTENT_SET.  In order to clarify it,
toss all of the bogus names and force the filter writers to make sure
they understand what they are doing.

CONTENT_SET is new (horrible name - change if you have better idea), but
it indicates that it should run between RESOURCE and PROTOCOL.
mod_deflate is the ideal CONTENT_SET filter.

The changed type names are:
CONTENT is now RESOURCE.
HTTP_HEADER is now PROTOCOL.  However, most filters that used HTTP_HEADER
may want CONTENT_SET.  (Only things like POP and HTTP belong as PROTOCOL.)

MMN bump since all filters need to be recompiled due to filter reordering.

Revision 93745 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 02:09:30 2002 UTC (7 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 133122 byte(s)
Diff to previous 93736 (colored)
Remove the prev pointer from the filter chain.  This removes
the complexity of trying to set the filter chain correctly, with the
side-effect of forcing us to walk the entire chain whenever we add
a filter.  Since the filter chains are small, the decrease in
complexity is worth it.
Reviewed by:	Allan Edwards

Revision 93736 - (view) (annotate) - [select for diffs]
Modified Wed Mar 6 18:03:19 2002 UTC (7 years, 8 months ago) by aaron
Original Path: httpd/httpd/trunk/server/core.c
File length: 133122 byte(s)
Diff to previous 93717 (colored)
Fix a bug in the APR_MODE_EXHAUSTIVE mode for the core input filter.
This patch changes nothing outside of that mode.

Also, why do we ever call apr_brigade_length() in the core? This doesn't
seem right to me, so here's a comment above the other call.

Revision 93717 - (view) (annotate) - [select for diffs]
Modified Tue Mar 5 20:43:24 2002 UTC (7 years, 8 months ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 132964 byte(s)
Diff to previous 93711 (colored)
Sander's Stylistic Submission
(de-tab)
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 93711 - (view) (annotate) - [select for diffs]
Modified Tue Mar 5 15:46:21 2002 UTC (7 years, 8 months ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 128332 byte(s)
Diff to previous 93709 (colored)
fix <Directory ~ blah> containers.

also, eradicate a few nefarious tabs which were found lurking in the vicinity.

Submitted by:  Rob Simonson <simo@us.ibm.com>
Reviewed by:   Greg Ames

Revision 93709 - (view) (annotate) - [select for diffs]
Modified Tue Mar 5 05:24:21 2002 UTC (7 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 128240 byte(s)
Diff to previous 93694 (colored)
Only insert net_filter once per request.  Initialize the output
protocol filters.

Revision 93694 - (view) (annotate) - [select for diffs]
Modified Mon Mar 4 09:20:03 2002 UTC (7 years, 8 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 128220 byte(s)
Diff to previous 93688 (colored)
Ensure that net_time filter isn't added on subreqs - we assume that it is
added on !r->main requests.  This led to infinite loop/SEGV when dealing
with anything that created a subreq.

(I don't think core_create_req is a good place for adding this filter.)

Revision 93688 - (view) (annotate) - [select for diffs]
Modified Sun Mar 3 22:34:55 2002 UTC (7 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 128217 byte(s)
Diff to previous 93570 (colored)
Classify some of the input filters as the correct types.  Previous to
this patch, the type wasn't too important, because all filters were
put on the same list.  After this patch, the filter type is very important,
because there are three different types of filters, and they are all treated
differently, namely:

CONNECTION:	Filters of this type are valid for the lifetime of this
		connection.
PROTOCOL:	Filters of this type are valid for the lifetime of this
		request from the point of view of the client, this means
		that the request is valid from the time that the request
		is sent until the time that the response is received.
CONTENT:	Filters of this type are valid for the time that this
		content is used to satisfy a request.  For simple requests,
		this is identical to PROTOCOL, but internal redirects
		and sub-requests can change the content without ending
		the request.

It is important to realize that the three major types above are actually
broken down into smaller groups in the code, to ensure that the ordering
of filters is always correct.

Revision 93570 - (view) (annotate) - [select for diffs]
Modified Tue Feb 26 04:04:54 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 128213 byte(s)
Diff to previous 93565 (colored)
Fix segfault if content_type is NULL.

Revision 93565 - (view) (annotate) - [select for diffs]
Modified Mon Feb 25 06:54:40 2002 UTC (7 years, 9 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 128166 byte(s)
Diff to previous 93534 (colored)
I learned about AP_MODE_EXHAUSTIVE while reading some of the new filter
code earlier today.  With this mode, the Perchild MPM can finally be
fixed to work with filters.  I have changed a comment in the core to make
it clear that this mode is required, but I have mentioned how dangerous
this mode is.  Also add a comment to STATUS about my plans.

Hopefully I'll have some time this week to hack through the MPM.

Revision 93534 - (view) (annotate) - [select for diffs]
Modified Thu Feb 21 17:20:26 2002 UTC (7 years, 9 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 128033 byte(s)
Diff to previous 93524 (colored)
  This code should be a noop today.  But I did not feel comfortable about
  reusing/recopying each bucket -after- inserting it into the brigade.
  Also, copying bucket c from b from a seemed obtuse.

  This patch creates the single bucket, makes a copy of it for each
  sendfile chunk we are about to add to the brigade, and finally consumes
  that initial bucket as the final file bucket of the brigade.

Revision 93524 - (view) (annotate) - [select for diffs]
Modified Thu Feb 21 02:19:39 2002 UTC (7 years, 9 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 128003 byte(s)
Diff to previous 93490 (colored)
  Fix the close-on-sendfile bug where Win32 would transmit a single
  sendfile bucket and then lose it's socket, and fix a comment.

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

Revision 93490 - (view) (annotate) - [select for diffs]
Modified Tue Feb 19 04:45:53 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 127974 byte(s)
Diff to previous 93458 (colored)
Introduce AddOutputFilterByType directive.

AddOutputFilterByType DEFLATE text/html

(I will add docco soon, I promise.  If someone beats me to it, cool...)

Revision 93458 - (view) (annotate) - [select for diffs]
Modified Sun Feb 17 19:21:31 2002 UTC (7 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 123890 byte(s)
Diff to previous 93296 (colored)
stop using APR_BRIGADE_NORMALIZE()

(okay, making a copy of it is cheating perhaps, but the name of the
game is to get APR_BRIGADE_NORMALIZE() out of the API)

Revision 93296 - (view) (annotate) - [select for diffs]
Modified Wed Feb 6 16:58:37 2002 UTC (7 years, 9 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 123450 byte(s)
Diff to previous 93293 (colored)
Be a bit more sane with regard to CanonicalNames.  If the user has
specified they want to use the CanonicalName, but they have not
configured a port with the ServerName, then use the same port that
the original request used.

Submitted by:   Ryan Bloom and Ken Coar

Revision 93293 - (view) (annotate) - [select for diffs]
Modified Wed Feb 6 16:16:55 2002 UTC (7 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 123280 byte(s)
Diff to previous 93270 (colored)
yet another tweak to empty brigade checking on entry to core_input_filter():

  since APR_BRIGADE_EMPTY() assumes a non-empty brigade, we have to check
  before invoking that macro

  since APR_BRIGADE_EMPTY() can make a brigade empty, we have to check
  after invoking that macro

An obvious variation of this fix would be to change APR_BRIGADE_NORMALIZE()
to deal with empty brigades.

Revision 93270 - (view) (annotate) - [select for diffs]
Modified Wed Feb 6 02:24:18 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 123198 byte(s)
Diff to previous 93262 (colored)
- Fix up a comment so that it makes more sense and explains why we return
  APR_EOF instead of an EOS bucket.
- Start to try to be nice when we *know* we are EOS by removing the
  bucket.  This is only one case where we could end up with a 0 bucket
  in ctx->b, but let's remove it and move on.  (If the bucket were to
  return 0 bytes and still have data left to read on blocking mode,
  it's blantly broken, IMHO)

Revision 93262 - (view) (annotate) - [select for diffs]
Modified Tue Feb 5 22:56:44 2002 UTC (7 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 122341 byte(s)
Diff to previous 93259 (colored)
In core_input_filter, check for an empty brigade after
APR_BRIGADE_NORMALIZE().  Otherwise, we can get segfaults if a
client says it will post some data but we get FIN before any
data arrives.

Revision 93259 - (view) (annotate) - [select for diffs]
Modified Tue Feb 5 22:18:49 2002 UTC (7 years, 9 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 122275 byte(s)
Diff to previous 93171 (colored)
Remove the install_transport_filters hook.  The same function can be
acheived with the pre_connection hook.  I have added the socket to the
pre_connection phase to make this possible.
Reviewed by:	Bill Stoddard

Revision 93171 - (view) (annotate) - [select for diffs]
Modified Fri Feb 1 22:16:31 2002 UTC (7 years, 9 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 122276 byte(s)
Diff to previous 93091 (colored)
Reintroduce the create_connection hook. This hook is required to enable
modules to completely take over all network i/o from the core.

Revision 93091 - (view) (annotate) - [select for diffs]
Modified Wed Jan 30 01:57:53 2002 UTC (7 years, 9 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 120687 byte(s)
Diff to previous 93087 (colored)
Now how did this slip by. Fixes a segfault. I tested this code, really...

Revision 93087 - (view) (annotate) - [select for diffs]
Modified Tue Jan 29 19:02:04 2002 UTC (7 years, 9 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 120692 byte(s)
Diff to previous 93071 (colored)
This patch restores most of Ryan's patch (11/12/2001) to remove the
client_socket from the conn_rec.  Diffs from Ryan's patch include:

- rename the create_connection hook to install_transport_filters
- move the point of invocation of the hook till after the call to
  after ap_update_vhost_given_ip to enable the hook to use vhost
  config info in its decision making.

Revision 93071 - (view) (annotate) - [select for diffs]
Modified Tue Jan 29 04:54:05 2002 UTC (7 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 119639 byte(s)
Diff to previous 93050 (colored)
Don't let the default handler try to serve a raw directory.  At
best you get gibberish.  Much worse things can happen depending
on the OS.

This can happen when autoindex isn't loaded.

On AIX, I had a directory file which was reported to be 1536 bytes
in size.  mmap() failed so we went to the fall-back logic.
The first read() got 624 bytes and the next read() got 0
(supposedly EOF).  This confused us greatly, we kept allocating
buffers and reading and exercised the paging space.

Reviewed by:  Bill Rowe

Revision 93050 - (view) (annotate) - [select for diffs]
Modified Sun Jan 27 12:52:08 2002 UTC (7 years, 10 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 119507 byte(s)
Diff to previous 93040 (colored)
Remove the create_connection hook and put the client_socket back into the
conn_rec. The create_connection_hook has a design flaw that prevents it
from making decisions based on vhost information.

Revision 93040 - (view) (annotate) - [select for diffs]
Modified Sun Jan 27 02:13:10 2002 UTC (7 years, 10 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 121606 byte(s)
Diff to previous 93038 (colored)
Performance improvement: incorporated the use of the new
ap_add_input_filter_handle() and ap_add_output_filter_handle()
functions for core filters

Revision 93038 - (view) (annotate) - [select for diffs]
Modified Sat Jan 26 23:05:10 2002 UTC (7 years, 10 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 120899 byte(s)
Diff to previous 93014 (colored)
avoid a palloc of zero bytes so memory debuggers don't barf

Revision 93014 - (view) (annotate) - [select for diffs]
Modified Fri Jan 25 01:11:47 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 120604 byte(s)
Diff to previous 92956 (colored)
Change ap_get_brigade prototype to remove *readbytes in favor of readbytes.
If you need the length, you should be using apr_brigade_length.  This is
much more consistent.  Of all the places that call ap_get_brigade, only
one (ap_http_filter) needs the length.  This makes it now possible to
pass constants down without assigning them to a temporary variable first.

Also:
- Change proxy_ftp to use EXHAUSTIVE mode (didn't catch its -1 before)
- Fix buglet in mod_ssl that would cause it to return too much data in
  some circumstances

Revision 92956 - (view) (annotate) - [select for diffs]
Modified Mon Jan 21 01:43:30 2002 UTC (7 years, 10 months ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 120841 byte(s)
Diff to previous 92944 (colored)
These changes are to allow caching of subrequests via a quick_handler.

* Change SUBREQ_CORE so that it is a HTTP_HEADER (20) filter instead of a content filter (10)
  this allows subrequests to add content filters properly

* Change subreq handling of 'handle-include' so that it splits/passes the brigade before the subreq
  is created. (This allows quick_handler to push content back from this phase)

Revision 92944 - (view) (annotate) - [select for diffs]
Modified Sun Jan 20 11:43:37 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 120837 byte(s)
Diff to previous 92943 (colored)
Make core_input_filter use the new apr_brigade_split_line function.

Revision 92943 - (view) (annotate) - [select for diffs]
Modified Sun Jan 20 11:37:07 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 121474 byte(s)
Diff to previous 92928 (colored)
Add AP_MODE_SPECULATIVE support to core_input_filter

Revision 92928 - (view) (annotate) - [select for diffs]
Modified Sat Jan 19 07:45:18 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 121030 byte(s)
Diff to previous 92835 (colored)
Input filtering prototype change: Socket blocking type should be
separate from the input filter mode type.

We also no longer look at readbytes to determine the method of
filter operation.  This makes the use of filters more obvious and
allows a wider range of options for input filters modes.

To start with, the new input filter modes are:

AP_MODE_READBYTES (no more than *readbytes returned)
AP_MODE_GETLINE (old *readbytes == 0 case)
AP_MODE_EATCRLF (old AP_MODE_PEEK)
AP_MODE_SPECULATIVE (will be used in a future ap_getline rewrite)
AP_MODE_EXHAUSTIVE (old *readbytes == -1 case)
AP_MODE_INIT (special case for NNTP over SSL)

The block parameter is an apr_read_type_e: APR_BLOCK_READ, APR_NONBLOCK_READ

This also allows cleanup of mod_ssl's handling in the getline case.

Reviewed by:	Ryan Bloom (concept), Greg Stein (concept)

Revision 92835 - (view) (annotate) - [select for diffs]
Modified Sat Jan 12 02:43:31 2002 UTC (7 years, 10 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 120857 byte(s)
Diff to previous 92830 (colored)
Move a check for an empty brigade to the start of core input filter
to avoid segfaults.

Using prefork MPM and APR_POOL_DEBUG and ElectricFence, I found a
couple of paths where weren't able to report APR_EOF all the way
back up the call tree, leading us back into core_input_filter with
an empty brigade.

Some of the paths in core_input_filter handled it, some didn't.

Revision 92830 - (view) (annotate) - [select for diffs]
Modified Fri Jan 11 18:55:27 2002 UTC (7 years, 10 months ago) by coar
Original Path: httpd/httpd/trunk/server/core.c
File length: 120813 byte(s)
Diff to previous 92771 (colored)
	Bring forward the FileETag directive enhancement from 1.3.23-dev.
	(Passes all 61 of the apache/etags.t test.)  Bump MMN due to
	change to core_dir_config structure (new fields at end).

Revision 92771 - (view) (annotate) - [select for diffs]
Modified Tue Jan 8 17:07:19 2002 UTC (7 years, 10 months ago) by dreid
Original Path: httpd/httpd/trunk/server/core.c
File length: 116223 byte(s)
Diff to previous 92769 (colored)
Restore the apr_pool_clear calls to main.c in case we have
third-parties who are overriding the open_logs hook, in which case
they'd miss the plog being cleared.

Submitted by:	Justin <jerenkrantz@apache.org>

Revision 92769 - (view) (annotate) - [select for diffs]
Modified Tue Jan 8 16:30:16 2002 UTC (7 years, 10 months ago) by dreid
Original Path: httpd/httpd/trunk/server/core.c
File length: 116249 byte(s)
Diff to previous 92700 (colored)
This small patch modifies the log's to use plog instead of pconf.
Basically pconf is cleared at different times from plog, and this
has the effect of leaving stderr closed when going into the next
stage of the config. This also had the effect of allowing FreeBSD
with threads to create a pipe with stderr's fd at one end, and this
resulted in problems with the signal polling and high cpu usage.

In addition, move the clearing of plog from main.c to core.c where
it seems more appropriate.

This solves the first and main problem that FreeBSD has with the
threaded MPM's.

Revision 92700 - (view) (annotate) - [select for diffs]
Modified Wed Jan 2 07:56:25 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 116224 byte(s)
Diff to previous 92698 (colored)
Fix LimitRequestBody directive by moving the relevant code from
ap_*_client_block to ap_http_filter (aka HTTP_IN).  This is the
only appropriate place for limit checking to occur (otherwise,
chunked input is not correctly limited).

Also changed the type of limit_req_body to apr_off_t to match the
other types inside of HTTP_IN.  Also made the strtol call for
limit_req_body a bit more robust.

Revision 92698 - (view) (annotate) - [select for diffs]
Modified Wed Jan 2 05:29:08 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 116125 byte(s)
Diff to previous 92697 (colored)
Remove a needless immortal bucket creation.  We can just leave the
brigade as-is.

Suggested by: Cliff

Revision 92697 - (view) (annotate) - [select for diffs]
Modified Tue Jan 1 20:36:18 2002 UTC (7 years, 10 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 116219 byte(s)
Diff to previous 92684 (colored)
Generalized the recent prep_walk_cache optimizations to allow other
modules to register "notes" within the array of working data in
the core_request_config

Revision 92684 - (view) (annotate) - [select for diffs]
Modified Mon Dec 31 08:18:32 2001 UTC (7 years, 10 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 115208 byte(s)
Diff to previous 92620 (colored)
Performance fix for prep_walk_cache():

Moved the directory/location/file-walk caches from the
request's pool userdata hash table to the core_request_config
struct.

This change removes about 60% of the processing time from
prep_walk_cache().

Revision 92620 - (view) (annotate) - [select for diffs]
Modified Thu Dec 27 13:28:42 2001 UTC (7 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 115137 byte(s)
Diff to previous 92512 (colored)
avoid some ugly sockaddr comparisons in do_double_reverse() by using
apr_sockaddr_equal()

Revision 92512 - (view) (annotate) - [select for diffs]
Modified Tue Dec 18 13:48:54 2001 UTC (7 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 115841 byte(s)
Diff to previous 92460 (colored)
Change core code to allow an MPM to set hard thread/server
limits at startup.

Revision 92460 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 19:44:45 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 115863 byte(s)
Diff to previous 92459 (colored)
  Whoops, that's quadstate, the value 3 is not-present.

Revision 92459 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 19:13:23 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 115886 byte(s)
Diff to previous 92448 (colored)
  As suggested by Josh Slive, add the explicit 'default' to AcceptPathInfo.
  I'll leave docs up to him.  The conf becomes a quadstate (undef != default)
  but other than that, it should make things cleaner for the user.

Revision 92448 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 16:11:41 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 115393 byte(s)
Diff to previous 92444 (colored)
  If dconf->accept_path_info is tristate, why not r->used_path_info?
  This patch allows us to force path_info off in mod_cgi[d] etc, patch
  forthcoming.  It also allows includes, php, etc to change the undefined
  value in the early handler or late fixup phases to Accept'ed.

Revision 92444 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 05:49:27 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 114919 byte(s)
Diff to previous 92441 (colored)
  Now all should be well.  AcceptPathInfo on will give us a document with
  path_info served from the core handler.  Any filters can then manipulate
  all the usual CGI envvars [as proven with this little excerpt with a
  <!--#printenv --> document...

<FilesMatch ".*\.shtml.*">
    Options +Includes
    SetOutputFilter INCLUDES
    AcceptPathInfo on
</FilesMatch>

  a potentially questionable config, but effective.

Revision 92441 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 02:35:31 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 114020 byte(s)
Diff to previous 92439 (colored)
  Kill some redundancy (why test PUT when we disallow all but GET/POST?)
  and add some thoughts.

Revision 92439 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 00:46:40 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 113757 byte(s)
Diff to previous 92438 (colored)
  Periods aren't commas.  Clear out some inappropriate casts while
  we are at it.

Revision 92438 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 00:43:13 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 113779 byte(s)
Diff to previous 92353 (colored)
  Whatever this was doing, it looks most unholy.

Revision 92353 - (view) (annotate) - [select for diffs]
Modified Thu Dec 6 02:54:47 2001 UTC (7 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 113640 byte(s)
Diff to previous 92352 (colored)
don't lose the const-ness of the string being searched

Revision 92352 - (view) (annotate) - [select for diffs]
Modified Thu Dec 6 01:20:16 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 113632 byte(s)
Diff to previous 92197 (colored)
Replaced ap_strcmp_match call that checked for a '/' in the
handler name with the equivalent (but less heavyweight)
strchr call

Revision 92197 - (view) (annotate) - [select for diffs]
Modified Tue Nov 27 08:39:02 2001 UTC (8 years ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 113641 byte(s)
Diff to previous 92196 (colored)
Another performance-related change to core_output_filter(): if we
get a long stream of small buckets, so that multiple concatenation
steps are required in a single pass through the brigade, re-use the
buckets from the previous temp brigade when creating the next one.
This allows us to avoid making yet another copy of the previously
concatenated data.

Revision 92196 - (view) (annotate) - [select for diffs]
Modified Tue Nov 27 06:35:29 2001 UTC (8 years ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 111282 byte(s)
Diff to previous 92182 (colored)
Optimization for core_output_filter: if the iovec is full,
don't try to concatenate buffers if we already have at least
8KB of data ready to send.  Instead, just split the brigade
and send what's currently in the iovec.

Revision 92182 - (view) (annotate) - [select for diffs]
Modified Mon Nov 26 18:49:36 2001 UTC (8 years ago) by jwoolley
Original Path: httpd/httpd/trunk/server/core.c
File length: 110917 byte(s)
Diff to previous 92176 (colored)
The survey says yes, that is in fact the expected behavior.  :)

Revision 92176 - (view) (annotate) - [select for diffs]
Modified Mon Nov 26 08:49:29 2001 UTC (8 years ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 110985 byte(s)
Diff to previous 92174 (colored)
Another fix for the core_output_filter() code that concatenates
small buckets: It's possible for the temporary brigade to
contain more than one bucket.  If this happens, we need to
recover the buckets after the first from the temporary brigade
before destroying it.

Revision 92174 - (view) (annotate) - [select for diffs]
Modified Mon Nov 26 07:21:48 2001 UTC (8 years ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 110561 byte(s)
Diff to previous 92171 (colored)
More fixes for core_input_filter()'s concatenation of small buckets:
update last_e and nbytes after compacting the brigade

Revision 92171 - (view) (annotate) - [select for diffs]
Modified Mon Nov 26 03:51:40 2001 UTC (8 years ago) by brianp
Original Path: httpd/httpd/trunk/server/core.c
File length: 110476 byte(s)
Diff to previous 92149 (colored)
Fix for the code in core_output_filter() that concatenates small buckets
into one big bucket...it was putting a pointer to a deleted bucket in
the iovec, so the output was corrupted.

Revision 92149 - (view) (annotate) - [select for diffs]
Modified Sat Nov 24 00:08:30 2001 UTC (8 years ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 110402 byte(s)
Diff to previous 92146 (colored)
change open_logs hook to return a value, allowing you to flag a error
while opening logs

Obtained from: Doug MacEachern

Revision 92146 - (view) (annotate) - [select for diffs]
Modified Fri Nov 23 19:28:04 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 110386 byte(s)
Diff to previous 92144 (colored)
Fix a bug in the core_output_filter.  If we are buffering, it helps
to read from the correct bucket.

Revision 92144 - (view) (annotate) - [select for diffs]
Modified Fri Nov 23 16:35:22 2001 UTC (8 years ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 110383 byte(s)
Diff to previous 92097 (colored)
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)

Revision 92097 - (view) (annotate) - [select for diffs]
Modified Wed Nov 21 18:25:40 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 110369 byte(s)
Diff to previous 92073 (colored)
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.

Revision 92073 - (view) (annotate) - [select for diffs]
Modified Wed Nov 21 03:46:22 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 109444 byte(s)
Diff to previous 92042 (colored)
Fix the timeout logic that I broke last week.  This adds a request
level filter that sets the timeout on the socket that is connected
to the client.

Thanks Greg Stein for seeing this bug.

Revision 92042 - (view) (annotate) - [select for diffs]
Modified Mon Nov 19 22:36:20 2001 UTC (8 years ago) by dougm
Original Path: httpd/httpd/trunk/server/core.c
File length: 108874 byte(s)
Diff to previous 92024 (colored)
add new input filter mode AP_MODE_INIT:
allows filters such as mod_ssl to initialize a client connection
(ie handshake) before reading request data from the client.
PR:
Obtained from:
Submitted by:   dougm
Reviewed by:	wrowe

Revision 92024 - (view) (annotate) - [select for diffs]
Modified Sun Nov 18 02:57:12 2001 UTC (8 years ago) by ianh
Original Path: httpd/httpd/trunk/server/core.c
File length: 108258 byte(s)
Diff to previous 91968 (colored)
change the signature of ap_custom_response() to use a
"const char *" instead of a "char *".


PR: 8791
Submitted by: Kurt Brown kurtb149@yahoo.com
Reviewed by:	Ian Holsman

Revision 91968 - (view) (annotate) - [select for diffs]
Modified Thu Nov 15 20:49:54 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 108251 byte(s)
Diff to previous 91962 (colored)
Pull lingering close out of the pool cleanup phase.  This was causing too
many bugs.  Instead, it is called where it used to be called.  I have
abstracted some of the logic out of the lingering close so that it gets
the socket from the connection using the core's conn_config vector.  This
is in anticipation of a change to use a hook for the lingering close,
which I hope to do soon.

Revision 91962 - (view) (annotate) - [select for diffs]
Modified Thu Nov 15 04:39:55 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 108688 byte(s)
Diff to previous 91952 (colored)
FTYPE_CONTENT - 1 isn't enough for OLD_WRITE.  OLD_WRITE is a special
filter, and it MUST run absolutely first.  To allow other filters a little
space to manuver, I am moving this to FTYPE_CONTENT - 10.

Submitted by:	John Sterling <sterling@covalent.net>

Revision 91952 - (view) (annotate) - [select for diffs]
Modified Wed Nov 14 21:18:47 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 108687 byte(s)
Diff to previous 91922 (colored)
Get the proxy module compiling again.  This is a hack to get past the
current compiler errors.  Basically, the core now puts the socket
in the conn_rec->conn_config vector.  The proxy grabs that socket and
uses it where it used to use the client_socket field from the conn_rec.
Long-term, all of the direct socket communication needs to be removed,
and this should go through a filter stack.  Short-term, this gets the
proxy working again.

I have tested http and connect, but I haven't looked at the FTP proxy,
although it does compile now.

Revision 91922 - (view) (annotate) - [select for diffs]
Modified Wed Nov 14 00:38:16 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 108621 byte(s)
Diff to previous 91913 (colored)
Move this to a HOOK_MIDDLE location.  We need to add some logic to
make sure that we have a socket that the core controls if we do this,
but it is more correct.

Submitted by:	Greg Stein

Revision 91913 - (view) (annotate) - [select for diffs]
Modified Tue Nov 13 20:29:54 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 108626 byte(s)
Diff to previous 91906 (colored)
Add the server_rec argument back to the create_connection hook.
Submitted by:	Greg Stein

Revision 91906 - (view) (annotate) - [select for diffs]
Modified Tue Nov 13 17:44:07 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 108630 byte(s)
Diff to previous 91899 (colored)
Back out my last patch.  The logic to add sockets to pollsets is back in
the MPM

Revision 91899 - (view) (annotate) - [select for diffs]
Modified Tue Nov 13 07:15:36 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 109077 byte(s)
Diff to previous 91890 (colored)
This allows modules to add socket descriptors to the pollset.  I have
only added this to the perfork MPM, and the others work without it.
Tomorrow I will add it to the other MPMs.

Revision 91890 - (view) (annotate) - [select for diffs]
Modified Tue Nov 13 02:09:07 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 108630 byte(s)
Diff to previous 91889 (colored)
Cleanup some code that was created during the abstration.  This basically
takes the old ap_new_connection, and puts into the new core_create_conn
function.  There is no good reason to have two functions to do this.

Revision 91889 - (view) (annotate) - [select for diffs]
Modified Tue Nov 13 01:24:42 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 107392 byte(s)
Diff to previous 91887 (colored)
Remove more network logic from the MPMs.  Essentially, each MPM can define
AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK, which tells Apache to disable_nagle
on the accepted socket.

Revision 91887 - (view) (annotate) - [select for diffs]
Modified Mon Nov 12 23:49:08 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 107310 byte(s)
Diff to previous 91798 (colored)
Begin to abstract out the underlying transport layer.
The first step is to remove the socket from the conn_rec,
the server now lives in a context that is passed to the
core's input and output filters. This forces us to be very
careful when adding calls that use the socket directly,
because the socket isn't available in most locations.

Revision 91798 - (view) (annotate) - [select for diffs]
Modified Thu Nov 8 14:29:37 2001 UTC (8 years ago) by martin
Original Path: httpd/httpd/trunk/server/core.c
File length: 106601 byte(s)
Diff to previous 91797 (colored)
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.

Revision 91797 - (view) (annotate) - [select for diffs]
Modified Thu Nov 8 12:34:21 2001 UTC (8 years ago) by martin
Original Path: httpd/httpd/trunk/server/core.c
File length: 106080 byte(s)
Diff to previous 91726 (colored)
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]

Revision 91726 - (view) (annotate) - [select for diffs]
Modified Fri Nov 2 15:17:06 2001 UTC (8 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 106028 byte(s)
Diff to previous 91715 (colored)
insure that we die quickly without looping etc. if somebody messes up
*readbytes again.

Revision 91715 - (view) (annotate) - [select for diffs]
Modified Wed Oct 31 22:55:43 2001 UTC (8 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 105978 byte(s)
Diff to previous 91713 (colored)
whoops! can't use the return code to pass the length up the filter chain.

with this and a request line that goes on forever, I now get:

[Wed Oct 31 17:45:45 2001] [error] [client 127.0.0.1] request failed:
URI too long

...in the error log, and a 414 in the access log.

Revision 91713 - (view) (annotate) - [select for diffs]
Modified Wed Oct 31 20:18:56 2001 UTC (8 years ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 105976 byte(s)
Diff to previous 91711 (colored)
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.

Revision 91711 - (view) (annotate) - [select for diffs]
Modified Wed Oct 31 18:21:53 2001 UTC (8 years ago) by aaron
Original Path: httpd/httpd/trunk/server/core.c
File length: 105975 byte(s)
Diff to previous 91650 (colored)
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).

Revision 91650 - (view) (annotate) - [select for diffs]
Modified Tue Oct 23 20:46:02 2001 UTC (8 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 105805 byte(s)
Diff to previous 91641 (colored)
set the c->aborted flag when we get EPIPE

Revision 91641 - (view) (annotate) - [select for diffs]
Modified Tue Oct 23 09:41:54 2001 UTC (8 years, 1 month ago) by jwoolley
Original Path: httpd/httpd/trunk/server/core.c
File length: 105762 byte(s)
Diff to previous 91625 (colored)
Fix a segfault seen on daedalus earlier this evening.  All that was happening
was that we forgot to check whether ctx->bb was empty, so when we pulled the
first bucket, it would be the sentinel, and we'd segfault trying to apr_bucket_read
the sentinel.

Revision 91625 - (view) (annotate) - [select for diffs]
Modified Mon Oct 22 04:36:46 2001 UTC (8 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 105694 byte(s)
Diff to previous 91624 (colored)
  Fix two typos in the last patch... compiles/tests clean... Greg, please
  run this against Apache.org until the first core and post the results.

Revision 91624 - (view) (annotate) - [select for diffs]
Modified Mon Oct 22 04:25:27 2001 UTC (8 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 105689 byte(s)
Diff to previous 91608 (colored)
  Perhaps fix the segfault... my earlier patch didn't since we already
  memcpy'ed the base into the merged per-dir config.

  This certainly cleans up that function though, and I hope increases
  it's legibility.

Revision 91608 - (view) (annotate) - [select for diffs]
Modified Sat Oct 20 18:29:09 2001 UTC (8 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 105447 byte(s)
Diff to previous 91558 (colored)
  Canonicalize all absolute <Directory > sections, not simply those that
  fail to end in a '/'.  Slash test is afterwords, once we've canonicalized
  any '\' and other aliases to '/'.

Revision 91558 - (view) (annotate) - [select for diffs]
Modified Fri Oct 19 02:08:44 2001 UTC (8 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 105444 byte(s)
Diff to previous 91556 (colored)
  Listen to my own advise.  Fortunately, the new apr_pool_readonly code
  catches these in no time ;)

Revision 91556 - (view) (annotate) - [select for diffs]
Modified Fri Oct 19 02:05:48 2001 UTC (8 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 105444 byte(s)
Diff to previous 91488 (colored)
  Guys... please be _careful_ when you pcalloc -> palloc!!!

  Resolves GAmes' segfault observations

Revision 91488 - (view) (annotate) - [select for diffs]
Modified Tue Oct 16 11:54:06 2001 UTC (8 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 105395 byte(s)
Diff to previous 91486 (colored)
don't lose the retcode in core_create_proxy_req()

Revision 91486 - (view) (annotate) - [select for diffs]
Modified Tue Oct 16 05:18:39 2001 UTC (8 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 105388 byte(s)
Diff to previous 91412 (colored)
Cleanup the proxy code that creates a request to the origin
server.  This change adds an optional hook, which allows modules
to gain control while the request is created if the proxy module
is loaded.  The purpose of this hook is to allow modules to add
input and/or output filters to the request to the origin.  While
I was at it, I made the core use this hook, so that proxy request
creation uses some of the code from the core.  This can still be
greatly improved, but this is a good start.

Revision 91412 - (view) (annotate) - [select for diffs]
Modified Thu Oct 11 01:38:28 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 105152 byte(s)
Diff to previous 91411 (colored)
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.

Revision 91411 - (view) (annotate) - [select for diffs]
Modified Wed Oct 10 22:14:10 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 105089 byte(s)
Diff to previous 91404 (colored)
We also need to increment *readbytes when we find a match in the middle of
a bucket.

Revision 91404 - (view) (annotate) - [select for diffs]
Modified Wed Oct 10 19:19:16 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 105052 byte(s)
Diff to previous 91403 (colored)
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

Revision 91403 - (view) (annotate) - [select for diffs]
Modified Wed Oct 10 18:45:22 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 105147 byte(s)
Diff to previous 91400 (colored)
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.

Revision 91400 - (view) (annotate) - [select for diffs]
Modified Wed Oct 10 15:34:35 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 105141 byte(s)
Diff to previous 91322 (colored)
Allow the bucket reading code in the core to handle EAGAIN properly.

Revision 91322 - (view) (annotate) - [select for diffs]
Modified Sat Oct 6 00:47:06 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 104504 byte(s)
Diff to previous 91312 (colored)
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

Revision 91312 - (view) (annotate) - [select for diffs]
Modified Fri Oct 5 08:54:19 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 104437 byte(s)
Diff to previous 91301 (colored)
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.

Revision 91301 - (view) (annotate) - [select for diffs]
Modified Fri Oct 5 02:27:48 2001 UTC (8 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 104217 byte(s)
Diff to previous 91293 (colored)
get rid of an unused variable

Revision 91293 - (view) (annotate) - [select for diffs]
Modified Thu Oct 4 20:00:53 2001 UTC (8 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 104241 byte(s)
Diff to previous 91191 (colored)
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.

Revision 91191 - (view) (annotate) - [select for diffs]
Modified Sat Sep 29 08:33:02 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 103861 byte(s)
Diff to previous 91189 (colored)
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

Revision 91189 - (view) (annotate) - [select for diffs]
Modified Sat Sep 29 08:17:11 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 103888 byte(s)
Diff to previous 91168 (colored)
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)

Revision 91168 - (view) (annotate) - [select for diffs]
Modified Fri Sep 28 04:35:59 2001 UTC (8 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 99837 byte(s)
Diff to previous 91078 (colored)
  Remove the translate_name hack that caused Greg Ames some grief with
  mod_rewrite.

Revision 91078 - (view) (annotate) - [select for diffs]
Modified Wed Sep 19 05:52:42 2001 UTC (8 years, 2 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/core.c
File length: 100036 byte(s)
Diff to previous 91058 (colored)
This patch eliminates the wasteful run-time conversion of method names from
strings to numbers in places where the methods are known at compile
time.

(Justin fixed the va_end() call to be correct.)

Submitted by:	Brian Pane <bpane@pacbell.net>
Reviewed by:	Justin Erenkrantz

Revision 91058 - (view) (annotate) - [select for diffs]
Modified Mon Sep 17 21:07:36 2001 UTC (8 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 100029 byte(s)
Diff to previous 91006 (colored)
   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.

Revision 91006 - (view) (annotate) - [select for diffs]
Modified Tue Sep 11 18:38:21 2001 UTC (8 years, 2 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 110977 byte(s)
Diff to previous 90847 (colored)
A very small optimization to the OLD_WRITE logic.  This just makes us store
a pointer to the OLD_WRITE frec, and instead of using strcmp or strcasecmp,
we can just do a simple pointer comparison.  This optimization is also
available to other modules.

Revision 90847 - (view) (annotate) - [select for diffs]
Modified Fri Aug 31 13:45:16 2001 UTC (8 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110951 byte(s)
Diff to previous 90813 (colored)
  Can it be this simple?  No, probably not, but this fast-hack will get
  us going again for a while.

  We are currently rejecting some internal file_sub_req()'s in the
  translate phase.  I don't like this hack because of risks it potentially
  exposes, but for today, if we have a filename - and we are a subrequest,
  then let it fly without further mapping.  This allows us to serve up
  the default "/" request (run through mod_dir->mod_negotiation->mod_mime)
  without a 400 error.  The right solution is to set up some traps and
  escapes for the subreq mechanism, possibly with a subreq translate hook,
  and drop the URI entirely for these cases.

Revision 90813 - (view) (annotate) - [select for diffs]
Modified Thu Aug 30 14:54:50 2001 UTC (8 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110739 byte(s)
Diff to previous 90810 (colored)
  Same as Jeff Trawick's patch [thank you!] only a tad faster, and error
  out on the old Set{Input|Output}Filter onefilter twofilter syntax
  (prior to this patch, only the last filter in a space seperated list
  would be configured.)

Revision 90810 - (view) (annotate) - [select for diffs]
Modified Thu Aug 30 11:42:59 2001 UTC (8 years, 2 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 110745 byte(s)
Diff to previous 90809 (colored)
fix an endless loop (well, until you run out of storage from
tiny apr_pstrdup() calls and your machine crashes) when you
have a filter chain

  ap_getword() returns an empty string, not a NULL string,
  when there are no more words

fix a segfault when you don't have a filter chain

  ap_getword() does not check for a NULL string to search

Revision 90809 - (view) (annotate) - [select for diffs]
Modified Thu Aug 30 08:26:08 2001 UTC (8 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110645 byte(s)
Diff to previous 90799 (colored)
  Thank you again for the proxy autobuild reports ;)

Revision 90799 - (view) (annotate) - [select for diffs]
Modified Thu Aug 30 05:10:54 2001 UTC (8 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110641 byte(s)
Diff to previous 90797 (colored)
     Changed syntax of Set{Input|Output}Filter.  The list of filters
     must be semicolon delimited (if more than one filter is given.)
     The Set{Input|Output}Filter directive now overrides a parent
     container's directive (e.g. SetInputFilter in <Directory /web/foo>
     will override any SetInputFilter directive in <Directory /web>.)
     This new syntax is more consistent with Add{Input|Output}Filter
     directives defined in mod_mime.  Also cures a bug in prior releases
     where the Set{Input|Output}Filter directive would corrupt the
     global configuration if the multiple directives were nested.
     [William Rowe]

Revision 90797 - (view) (annotate) - [select for diffs]
Modified Thu Aug 30 04:24:09 2001 UTC (8 years, 2 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 111213 byte(s)
Diff to previous 90760 (colored)
  Since the mod_mime patch was applied, here is the rest of the patch to
  introduce the ForceType and SetHandler [absolute references] directly
  into the very top of the fixups phase.  This means these will always
  override _any_ mime module, not just mod_mime.  Ergo, other mime modules
  can continue to set charset, encodings, etc.  Since these are globals,
  they belong in the core.

  This highlights a very serious drawback to the type_checker hook.  By
  using run first, a module that identifies _partial_ information (maybe
  just the content type) won't pass the query on to other modules, like
  mod_mime, that might further define the encoding or charset.  The
  type_checker hook should clearly become a run-all, and the modules should
  decline if they see someone ahead of them answered a question they were
  going to try to figure.

  Which means - if type_checker becomes RUN_ALL - this new override hook
  fn should become a type_checker again - and RUN_REALLY_FIRST, and let
  other modules _choose_ not to override this election.  (We can run it
  again at the end, for a recount ;)  Votes?

Revision 90760 - (view) (annotate) - [select for diffs]
Modified Tue Aug 28 15:45:01 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110024 byte(s)
Diff to previous 90736 (colored)
  This is the same granularity of control as mod_mime gave to set handlers
  (and now AddInputFilter and AddOutputFilter by extension) so this seems
  entirely appropriate in the core as well.  Options FileInfo is required
  to change the processing behavior of files.

Revision 90736 - (view) (annotate) - [select for diffs]
Modified Mon Aug 27 20:48:00 2001 UTC (8 years, 3 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 110270 byte(s)
Diff to previous 90729 (colored)
Fix a growing connection pool in core_output_filter() for
keepalive requests.  We were allocating a brigade out of the
connection pool; the number of these brigades allocated
per connection was theoretically unlimited.

Revision 90729 - (view) (annotate) - [select for diffs]
Modified Mon Aug 27 16:35:43 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 109714 byte(s)
Diff to previous 90698 (colored)
  Solve a bug I introduced this weekend, we want to compare core_*->r
  as a boolean, not by value.

  Reported by: Barrie Slaymaker <barries@slaysys.com>

Revision 90698 - (view) (annotate) - [select for diffs]
Modified Sun Aug 26 17:38:14 2001 UTC (8 years, 3 months ago) by dougm
Original Path: httpd/httpd/trunk/server/core.c
File length: 109575 byte(s)
Diff to previous 90684 (colored)
apr_pstrcat args were not NULL terminated

Revision 90684 - (view) (annotate) - [select for diffs]
Modified Sun Aug 26 05:10:17 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 109569 byte(s)
Diff to previous 90665 (colored)

  Eliminate proxy: (and all other 'special') processing from the
  ap_directory_walk() phase.  Modules that want to use special
  walk logic should refer to the mod_proxy map_to_location example,
  with it's proxy_walk and proxysection implementation.  This makes
  either directory_walk flavor much more legible, since that phase
  only runs against real <Directory > blocks.

  On a technical note, this patch also forces the Directory to be
  canonical (unless it is "/" or a regex.)  It also allows us to
  be more explicit when declaring <Directory > block errors.

Revision 90665 - (view) (annotate) - [select for diffs]
Modified Sat Aug 25 23:43:19 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 111251 byte(s)
Diff to previous 90646 (colored)
  Introduce the map_to_storage hook, which allows modules to bypass
  the directory_walk and file_walk for non-file requests.  TRACE
  shortcut moved to http_protocol.c as APR_HOOK_MIDDLE, and the
  directory_walk/file_walk happen as APR_HOOK_VERY_LAST in core.c.

  A seperate patch to mod_proxy is required to short circuit both the
  TRACE and directory_walk/file_walk stuff.  That patch is next.

Revision 90646 - (view) (annotate) - [select for diffs]
Modified Fri Aug 24 18:12:02 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110771 byte(s)
Diff to previous 90644 (colored)
  sec, sec, who's got a sec?  This gave me a headache, but I had to clear
  out the last patch before I rearranged this to be _readable_.

  Next step for everyone's sanity, provide <Proxy > directives ;)

Revision 90644 - (view) (annotate) - [select for diffs]
Modified Fri Aug 24 18:01:25 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110704 byte(s)
Diff to previous 90611 (colored)
  Commit this code before another patch becomes to difficult to follow.

  This patch does one thing, it changes the root path "/" to reflect an
  element count of Zero (0).  directory_walk will always accept the zero
  element (which sorts first, thankfully) on it's first go around.

  So, Unix will accept "/" when it's parsing it's first element "/".

  Dos/Win32 will accept "/" and "C:/" when they parse their first element,
  "C:/".  The root sorted first, so it behaves as users expect.

  The syntax "//" or "//machine" will be depreciated for now, the user
  needs to set up the extact "//machine/share/" that they want served
  on Win32.

Revision 90611 - (view) (annotate) - [select for diffs]
Modified Fri Aug 24 03:45:21 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110339 byte(s)
Diff to previous 90610 (colored)
  Will I ever get my str*cmp semantics right?  Not at this hour...

Revision 90610 - (view) (annotate) - [select for diffs]
Modified Fri Aug 24 03:40:18 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110332 byte(s)
Diff to previous 90598 (colored)
  My initial changes failed to accomodate this faux entry.
  If you didn't see any <Directory > blocks working right, try
  this cvs update.

Revision 90598 - (view) (annotate) - [select for diffs]
Modified Thu Aug 23 23:49:41 2001 UTC (8 years, 3 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 110214 byte(s)
Diff to previous 90594 (colored)
fix fubar with recent commit to ap_core_translate()

Revision 90594 - (view) (annotate) - [select for diffs]
Modified Thu Aug 23 22:19:49 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110216 byte(s)
Diff to previous 90593 (colored)
  Fix my typo (I invented the silly constant, you would expect me to recall it.)

Revision 90593 - (view) (annotate) - [select for diffs]
Modified Thu Aug 23 22:17:19 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 110206 byte(s)
Diff to previous 90591 (colored)
  Increase security in core.c by testing (as we merge the path) that the
  URI does not go above the DocumentRoot (as defined by the OS, not by
  the URI specification), and give us the true name.

  When we are done, note the name is canonical for directory_walk.

Revision 90591 - (view) (annotate) - [select for diffs]
Modified Thu Aug 23 21:56:36 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 109883 byte(s)
Diff to previous 90572 (colored)
  Start with the presumption that canonical_filename is not likely to be set.
  Therefore we will canonicalize it when it doesn't match filename.

  The next optimization should take the path common to canonical_filename
  and filename, and start merging filename from there for canonicalization.

Revision 90572 - (view) (annotate) - [select for diffs]
Modified Thu Aug 23 19:15:13 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 109841 byte(s)
Diff to previous 90356 (colored)
  Eliminated ap_os_[systemcase|[case_]canonical]_filename() and
  changes for ap_os_is_path_absolute (moved to util.c).

Revision 90356 - (view) (annotate) - [select for diffs]
Modified Sun Aug 19 05:48:19 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 109148 byte(s)
Diff to previous 90132 (colored)
Update the Apache code to account for the XtOffset change in APR.

Revision 90132 - (view) (annotate) - [select for diffs]
Modified Mon Aug 13 04:57:35 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 109112 byte(s)
Diff to previous 90090 (colored)
Begin to sanitize the MPM configuration directives.  Now, all
MPMs use the same functions for all common MPM directives.  This
should make it easier to catch all bugs in these directives once.

Everybody should check their favorite MPM to ensure that it still
compiles, and that these directives work.  This is a big patch, and
although it looks good, and things compiled for me, that is no
garauntee that it will work on all platforms.  :-)

Submitted by:	Cody Sherr <csherr@covalent.net>

Revision 90090 - (view) (annotate) - [select for diffs]
Modified Sat Aug 11 04:04:13 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 107775 byte(s)
Diff to previous 89987 (colored)
Fix the new method code.  We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>

Revision 89987 - (view) (annotate) - [select for diffs]
Modified Tue Aug 7 16:19:03 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 107763 byte(s)
Diff to previous 89869 (colored)
Remove all warnings from the input filtering stack.

Revision 89869 - (view) (annotate) - [select for diffs]
Modified Thu Aug 2 04:25:20 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 107764 byte(s)
Diff to previous 89863 (colored)
Add the ability to extend the methods that Apache understands
and have those methods <limit>able in the httpd.conf. It uses
the same bit mask/shifted offset as the original HTTP methods
such as M_GET or M_POST, but expands the total bits from an int to
an ap_int64_t to handle more bits for new request methods than
an int provides.
Submitted by:	Cody Sherr <csherr@covalent.net>

Revision 89863 - (view) (annotate) - [select for diffs]
Modified Wed Aug 1 19:15:22 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 108366 byte(s)
Diff to previous 89791 (colored)
  This patch fixes more untold breakage than you can shake a stick at.

Revision 89791 - (view) (annotate) - [select for diffs]
Modified Mon Jul 30 18:51:57 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 108134 byte(s)
Diff to previous 89750 (colored)
  Provide the same optimization to the dir_config structure to track
  d_is_absolute, along with d_is_fnmatch.

Revision 89750 - (view) (annotate) - [select for diffs]
Modified Sat Jul 28 00:46:49 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 107880 byte(s)
Diff to previous 89719 (colored)
  More obsessive changes to meet HTML 3.2, HTML 4.01 Transitional and
  XHTML 1.0 Transitional

Revision 89719 - (view) (annotate) - [select for diffs]
Modified Wed Jul 25 22:38:21 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 107880 byte(s)
Diff to previous 89714 (colored)
  Cliff's most sane advise :-)

Revision 89714 - (view) (annotate) - [select for diffs]
Modified Wed Jul 25 21:41:44 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 107717 byte(s)
Diff to previous 89683 (colored)
  This same patch is needed in mod_asis and others, I'm testing the waters
  for this solution.  I'm easily convinced to choose AP_MAX_SENDFILE based
  on any reasonable argument, provided it's smaller than 2^30 :-)

Revision 89683 - (view) (annotate) - [select for diffs]
Modified Tue Jul 24 20:38:01 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/core.c
File length: 107370 byte(s)
Diff to previous 89608 (colored)
  Changes to respect the new apr bucket and brigade length types (either
  apr_size_t for bucket lengths, or apr_off_t for aggregate brigade lengths.)

Revision 89608 - (view) (annotate) - [select for diffs]
Modified Wed Jul 18 20:45:36 2001 UTC (8 years, 4 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 107159 byte(s)
Diff to previous 89507 (colored)
Make scoreboard creation a hook.  This allows management
modules to have access to the scoreboard at the time that it is
created, and at every restart request.
Submitted by:	Cody Sherr <csherr@covalent.net>
Reviewed by:	Ryan Bloom

Revision 89507 - (view) (annotate) - [select for diffs]
Modified Fri Jul 6 18:41:56 2001 UTC (8 years, 4 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 107087 byte(s)
Diff to previous 89506 (colored)
Add error message and return if we fail reading from a bucket in the
core_outout_filter(). core_output_filter() is in need of a rewrite, it is
getting quite crufty.

Revision 89506 - (view) (annotate) - [select for diffs]
Modified Fri Jul 6 18:07:24 2001 UTC (8 years, 4 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 106817 byte(s)
Diff to previous 89438 (colored)
emulate_sendfile() is a better name for what this function does.  No function
change is made by this patch, only a static function name change.

Revision 89438 - (view) (annotate) - [select for diffs]
Modified Wed Jun 27 20:18:09 2001 UTC (8 years, 5 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/core.c
File length: 107037 byte(s)
Diff to previous 89384 (colored)
*) Account for the new pool parameter to apr_bucket_file_create()
   and apr_bucket_file_make().

*) Simplify mod_file_cache's sendfile_handler by taking advantage
   the new ability of file buckets to handle files opened in XTHREAD
   mode.  [Also inlined some of the brigade construction stuff in
   mod_file_cache's handlers to save a palloc() or two.]

Revision 89384 - (view) (annotate) - [select for diffs]
Modified Mon Jun 18 12:38:17 2001 UTC (8 years, 5 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 107028 byte(s)
Diff to previous 89370 (colored)
As with Apache 1.3, use priority APLOG_INFO (instead of APLOG_ERR) for
log messages which report network errors writing to the client.

Revision 89370 - (view) (annotate) - [select for diffs]
Modified Thu Jun 14 22:56:12 2001 UTC (8 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 107027 byte(s)
Diff to previous 89364 (colored)
Back out the change to allocate files out of the main request pool, and
implement pool-based setaside for FILE and MMAP buckets.

Revision 89364 - (view) (annotate) - [select for diffs]
Modified Wed Jun 13 20:11:45 2001 UTC (8 years, 5 months ago) by gstein
Original Path: httpd/httpd/trunk/server/core.c
File length: 107113 byte(s)
Diff to previous 89362 (colored)
Define a hook for fetching management/status items.

This patch was submitted by Ian Holsman. Greg revised some names, applied
the Apache style, and namespace-prefixed the public symbols. Minor bugfix in
the use of the hook implementation macro.

Submitted by: Ian Holsman <IanH@cnet.com>
Reviewed by: Greg Stein

Revision 89362 - (view) (annotate) - [select for diffs]
Modified Wed Jun 13 13:44:40 2001 UTC (8 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 106858 byte(s)
Diff to previous 89354 (colored)
Add a pool to the ap_save_brigade prototype.  This removes a todo from
the comments that is really necessary before the setaside stuff will
work properly.

Revision 89354 - (view) (annotate) - [select for diffs]
Modified Tue Jun 12 19:03:08 2001 UTC (8 years, 5 months ago) by gregames
Original Path: httpd/httpd/trunk/server/core.c
File length: 106850 byte(s)
Diff to previous 89309 (colored)
Fix seg faults and/or missing output from mod_include.  The
default_handler was using the subrequest pool for files and
MMAPs, even though the associated APR structures typically
live longer than the subrequest.

Revision 89309 - (view) (annotate) - [select for diffs]
Modified Fri Jun 8 16:39:48 2001 UTC (8 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 106764 byte(s)
Diff to previous 89041 (colored)
We need to increment i during this for loop.  Without this change, we will
end up in an infinite loop.
Submitted by:	Ryan Morgan

Revision 89041 - (view) (annotate) - [select for diffs]
Modified Sun May 6 23:27:14 2001 UTC (8 years, 6 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 106761 byte(s)
Diff to previous 89008 (colored)
Back out the recent change to ap_get_brigade, to make it use indirection
again.  The problem is that the amount of data read from the network,
is not necessarily the amount of data returned from the filters.  It is
possible for input filters to add bytes to the data read from the network.

To fix the original bug, I just removed the line from ap_get_client_block
that decremented r->remaining, we allow the http_filter to do that for
us.

I have also removed an incorrect comment.

Revision 89008 - (view) (annotate) - [select for diffs]
Modified Sat May 5 11:18:01 2001 UTC (8 years, 6 months ago) by gstein
Original Path: httpd/httpd/trunk/server/core.c
File length: 107123 byte(s)
Diff to previous 88978 (colored)
Fix a bug in the input handling. ap_http_filter() was modifying *readbytes
which corresponded to r->remaining (in ap_get_client_block). However,
ap_get_client_block was *also* adjusting r->remaining. Net result was that
PUT (and probably POST) was broken. (at least on large inputs)

To fix it, I simply removed the indirection on "readbytes" for input
filters. There is no reason for them to return data (the brigade length is
the return length). This also simplifies a number of calls where people
needed to do &zero just to pass zero.

I also added a number of comments about operations and where things could be
improved, or are (semi) broken.

Revision 88978 - (view) (annotate) - [select for diffs]
Modified Wed May 2 20:15:56 2001 UTC (8 years, 6 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/core.c
File length: 106765 byte(s)
Diff to previous 88972 (colored)
Set the conn_rec->aborted flag when we detect a whacked connection on the
write path.

Revision 88972 - (view) (annotate) - [select for diffs]
Modified Tue May 1 21:59:26 2001 UTC (8 years, 6 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 106621 byte(s)
Diff to previous 88970 (colored)
Fix the logic for saving data onto the heap before sending it.  Basically,
we have to use nbytes+flen when figuring out how much data we have,
and when looking at the fact that we have a buffer to save aside before
sending it, we also need to look at the length, to ensure that we aren't
saving too much.
Submitted by:	Bill Stoddard and Ryan Bloom

Revision 88970 - (view) (annotate) - [select for diffs]
Modified Tue May 1 19:40:14 2001 UTC (8 years, 6 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 106574 byte(s)
Diff to previous 88969 (colored)
AP_MIN_BYTES_TO_WRITE currently equals APR_BUCKET_BUFF_SIZE, so we
have to use <=

Revision 88969 - (view) (annotate) - [select for diffs]
Modified Tue May 1 18:43:09 2001 UTC (8 years, 6 months ago) by gstein
Original Path: httpd/httpd/trunk/server/core.c
File length: 106573 byte(s)
Diff to previous 88964 (colored)
Add a comment about an assumption we make in our keepalive buffering.

Delay the check for "too many items in an iovec" until we actually try to
put something in there. This allows that N+1 bucket to be an EOS, FLUSH,
FILE, or zero-length bucket without triggering a split. Only if that next
bucket has iovec data will a split be made.

Revision 88964 - (view) (annotate) - [select for diffs]
Modified Sun Apr 29 17:05:49 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 105750 byte(s)
Diff to previous 88912 (colored)
Create Files, and thus MMAPs, out of the request pool, not the
connection pool.  This solves a small resource leak that had us
not closing files until a connection was closed.  In order to do
this, at the end of the core_output_filter, we loop through the
brigade and convert any data we have into a single HEAP bucket
that we know will survive clearing the request_rec.

Submitted by:	Ryan Bloom, Justin Erenkrantz <jerenkrantz@ebuilt.com>,
                Cliff Woolley

Revision 88912 - (view) (annotate) - [select for diffs]
Modified Sun Apr 22 22:19:32 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 105073 byte(s)
Diff to previous 88815 (colored)
At the hack-athon we decided to change the way that input filters
determine how much data is returned to the previous filter.  Prior to this
change, we used a field in the conn_rec to determine how much to return.
After this change, we use an argument to ap_get_brigade.  This makes it
much more obvious how things work at all levels, so that module authors
can easily determine how much data is supposed to be returned to them.

Revision 88815 - (view) (annotate) - [select for diffs]
Modified Wed Apr 11 23:37:16 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 105050 byte(s)
Diff to previous 88726 (colored)
When I initially pulled the BYTERANGE filter into the core, Greg Stein
told me I was wrong.  I was wrong, and Greg was right.  This commit
just moves the byterange filter and its related functions out of the core,
and puts them back in the HTTP specific module.
Submitted by:	Greg Stein

Revision 88726 - (view) (annotate) - [select for diffs]
Modified Wed Apr 4 21:41:52 2001 UTC (8 years, 7 months ago) by dreid
Original Path: httpd/httpd/trunk/server/core.c
File length: 105168 byte(s)
Diff to previous 88700 (colored)
Move the error logging of a failed send into the core output filter.  This
should catch errors in any way we send data.

Revision 88700 - (view) (annotate) - [select for diffs]
Modified Tue Apr 3 19:32:19 2001 UTC (8 years, 7 months ago) by dreid
Original Path: httpd/httpd/trunk/server/core.c
File length: 105225 byte(s)
Diff to previous 88576 (colored)
This adds some simple error logging to send_the_file. There are a
lot more cases that we should log :(

Revision 88576 - (view) (annotate) - [select for diffs]
Modified Sun Mar 25 17:38:18 2001 UTC (8 years, 8 months ago) by dougm
Original Path: httpd/httpd/trunk/server/core.c
File length: 105072 byte(s)
Diff to previous 88561 (colored)
change create_request hook to RUN_ALL/return int so handlers can throw errors

Revision 88561 - (view) (annotate) - [select for diffs]
Modified Thu Mar 22 10:03:29 2001 UTC (8 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 105058 byte(s)
Diff to previous 88532 (colored)
Fix a major security problem with double-reverse lookup checking.
Previously, a client connecting over IPv4 would not be matched
properly when the server had an IPv6 listening socket.

PR:	      7407
Submitted by: Taketo Kabe <kiabe@sra-tohoku.co.jp>
Reviewed by:  Jeff Trawick

Revision 88532 - (view) (annotate) - [select for diffs]
Modified Sun Mar 18 02:33:23 2001 UTC (8 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 104474 byte(s)
Diff to previous 88484 (colored)
Add a hook, create_request.  This hook allows modules to modify
a request while it is being created.  This hook is called for all
request_rec's, main request, sub request, and internal redirect.
When this hook is called, the the r->main, r->prev, r->next
pointers have been set, so modules can determine what kind of
request this is.

Currently, this is only used by the core module, but protocol modules
are going to need to have the ability to affect the request while it is
being read.

Revision 88484 - (view) (annotate) - [select for diffs]
Modified Fri Mar 9 20:30:34 2001 UTC (8 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/core.c
File length: 103940 byte(s)
Diff to previous 88449 (colored)
tweak ap_get_remote_host() so that the caller can find out if she got
back an IP address

mod_access needed to know this, but the old code didn't handle IPv6

Revision 88449 - (view) (annotate) - [select for diffs]
Added Sun Mar 4 06:27:27 2001 UTC (8 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/core.c
File length: 103737 byte(s)
Move more code from the http module into the core server.  This
is core code, basically the default handler, the default input
and output filters, and all of the core configuration directives.
All of this code is required in order for the server to work, with or
without HTTP.  The server is closer to working without the HTTP
module, although there is still more to do.

I tried to fix Windows, but somebody should probably make sure I did
it correctly.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2