1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

2735 Commits

Author SHA1 Message Date
William A. Rowe Jr
06836908ad Eliminate a very ugly race - the parallel starting threads were picking
up thread identifiers other than their own.  Because the limit of threads
  is an int, stuffing the int into the void* value is a safe argument
  convention.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123899 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 20:18:58 +00:00
William A. Rowe Jr
d962fcfc8b FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME!
Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 05:33:44 +00:00
Paul Querna
f64f95d9e1 * Add bits to use APR_TCP_DEFER_ACCEPT
* Log Warnings when adding defer accept or an accept filter fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111596 13f79535-47bb-0310-9956-ffa450edef68
2004-12-11 09:53:16 +00:00
Paul Querna
8a2c15b824 * core_filters.c: If APR_MAX_IOVEC_SIZE is defined, make sure we are under that limit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111594 13f79535-47bb-0310-9956-ffa450edef68
2004-12-11 09:34:19 +00:00
Greg Ames
1192058be2 ap_queue_push: update comment to reflect reality
pointed out by: Ron Park (ronp cnet.com)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111385 13f79535-47bb-0310-9956-ffa450edef68
2004-12-09 14:11:29 +00:00
Bradley Nicholes
694a529c09 Revert patch r104923. This patch doesn't actually fix bug 18757 and
breaks TLS upgrade functionality.  Also, removing the content length for
HEAD requests is being handled in ap_http_header_filter().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@110141 13f79535-47bb-0310-9956-ffa450edef68
2004-12-07 19:04:22 +00:00
Justin Erenkrantz
779e530a5c * server/mpm/experimental/event/event.c: Go through and reformat and correct
comments to be more appropriate.

*no functional changes*


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109773 13f79535-47bb-0310-9956-ffa450edef68
2004-12-04 05:25:57 +00:00
Greg Ames
7be370590c fix child process aborts with
assertion "!((queue)->nelts == (queue)->bounds)" failed
due to worker queue overflows. The listener/event thread
needs to block when all worker threads are busy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109631 13f79535-47bb-0310-9956-ffa450edef68
2004-12-03 05:28:00 +00:00
Jeff Trawick
592750b026 worker MPM: Fix a problem which could cause httpd processes to
remain active after shutdown.

The problem occurred when a scoreboard entry currently
in use by an exiting child process was used for a new child
process.  At that point, the MPM forgot about the exiting
child process, so ap_reclaim_child_processes() wouldn't be
able to forceably terminate it.

(An exiting child process may *never* exit due to a stuck
or long-running request being handled on one of the threads.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109510 13f79535-47bb-0310-9956-ffa450edef68
2004-12-02 17:39:22 +00:00
Joe Orton
a756d60d81 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109498 13f79535-47bb-0310-9956-ffa450edef68
2004-12-02 13:28:04 +00:00
Justin Erenkrantz
9bc839ed59 Declare the ap_set_listen* functions with AP_DECLARE_NONSTD for Win32 support.
(I think this is what is needed for Win32, but I'm not quite sure.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106988 13f79535-47bb-0310-9956-ffa450edef68
2004-11-30 06:29:56 +00:00
Jeff Trawick
1362105279 zap extra blank in error message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106918 13f79535-47bb-0310-9956-ffa450edef68
2004-11-29 15:37:03 +00:00
Paul Querna
c448a3d6c5 * server/core.c: Give an error instead of silently going on when a section is missing an argument.
PR: 25460
Submitted By: Geoffrey Young


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106879 13f79535-47bb-0310-9956-ffa450edef68
2004-11-29 04:15:24 +00:00
Justin Erenkrantz
503cf34e74 Properly export ap_listen_* functions.
* server/listen.c: Add AP_DECLARE as appropriate.
* include/ap_listen.h: Add AP_DECLARE as appropriate.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106843 13f79535-47bb-0310-9956-ffa450edef68
2004-11-28 19:37:41 +00:00
Bradley Nicholes
8baaa0a27f Fixing various compiler error when compiling against the latest version of LibC SDK
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106766 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 22:50:18 +00:00
Greg Ames
895bdde8f8 listener_thread: no functional changes, formatting changes only
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106744 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 19:33:21 +00:00
Greg Ames
4c448acc3a only need one main listener loop.
logic changes only to minimize diff.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106743 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 19:29:26 +00:00
Justin Erenkrantz
439221058c 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().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106692 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 08:07:44 +00:00
Greg Ames
5f83105351 make the type field in listener_poll_type an enum to make gdb output more
useful.

add a comment about a field I haven't been able to grok yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106674 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 00:37:54 +00:00
William A. Rowe Jr
8f4105e37a If thread_num is long, this better be an %ld
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106653 13f79535-47bb-0310-9956-ffa450edef68
2004-11-26 20:10:41 +00:00
William A. Rowe Jr
9585028722 Drop a worthless emit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106075 13f79535-47bb-0310-9956-ffa450edef68
2004-11-21 07:10:32 +00:00
Paul Querna
34959f29db The Event MPM.
Designed to minimize Apache's KeepAlive overhead.

This MPM depends on the current APR-trunk for new features added to 
the apr_pollset interface. Currently the underlying operating
system must support KQueue or EPoll.

Status:
  Should work as a drop in replacement for all non-ssl servers.
  SSL Requests that use HTTP 1.1 Pipelining do not currently work.

Testing:
  I have tested it with Linux 2.6, FreeBSD 5.2.1, and OS X 10.3.
  
Originally based on the patch by Greg Ames.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105919 13f79535-47bb-0310-9956-ffa450edef68
2004-11-20 02:52:36 +00:00
Joe Orton
c36ecfa64f Remove the .cvsignore files.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105796 13f79535-47bb-0310-9956-ffa450edef68
2004-11-19 09:07:29 +00:00
Jeff Trawick
b16fe38fbb 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105682 13f79535-47bb-0310-9956-ffa450edef68
2004-11-04 16:04:55 +00:00
Joe Orton
4ddf48af17 Fix for memory consumption DoS, CVE CAN-2004-0942:
* server/protocol.c (ap_rgetline_core): Don't trim trailing whitespace
from the buffer here.
(ap_get_mime_headers_core): Trim trailing whitespace here, after
reading a complete field including continuation lines.  Also simplify
code to remove whitespace between field-name and colon.

Reviewed by: Andr�� Malo, Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105680 13f79535-47bb-0310-9956-ffa450edef68
2004-11-04 14:50:31 +00:00
Joe Orton
4bc7f40b18 * server/util_filter.c (ap_save_brigade): Be more tolerant of a bucket
type which neither implements ->setaside nor morphs on ->read, such as
the mod_perl SV bucket type in mod_perl <1.99_17; defer returning an
error in this case until after calling setaside on each bucket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105664 13f79535-47bb-0310-9956-ffa450edef68
2004-11-01 23:04:05 +00:00
Jeff Trawick
43eb49ae9d 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105652 13f79535-47bb-0310-9956-ffa450edef68
2004-11-01 13:06:51 +00:00
Jeff Trawick
81e4e36b0e 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105625 13f79535-47bb-0310-9956-ffa450edef68
2004-10-29 14:45:24 +00:00
Paul Querna
01148487b7 Use a more descriptive error message, and make it an INFO insteead of NOTICE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105593 13f79535-47bb-0310-9956-ffa450edef68
2004-10-25 15:59:43 +00:00
Nick Kew
d1c714c4f9 PR: 31875
Fix URI parsing bug in case of a leading double-slash


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105586 13f79535-47bb-0310-9956-ffa450edef68
2004-10-25 10:24:17 +00:00
Paul Querna
35e0b8cd51 This will put some messages in the error log when some people try a lame
DoS by just opening a socket, and never sending any data.

Ivan suggested such a change about a month ago, to match the 1.3 behavoir.

Today I helped OSU's Admins figure out that someone was trying this 'attack'
against their mirror server.  The server status just showed hundreds of
Apache Children stuck in Reading.  This will at least hint to the admins
where the problem is by telling them about it in the error log.

Inspired by: Rici Lake, Ivan Ristic <ivanr webkreator.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105583 13f79535-47bb-0310-9956-ffa450edef68
2004-10-25 06:40:08 +00:00
Roy T. Fielding
c76dd4ecef 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105572 13f79535-47bb-0310-9956-ffa450edef68
2004-10-23 22:39:53 +00:00
Allan K. Edwards
6c775f9a3c WIN64: API changes to clean up Windows 64bit compile warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105545 13f79535-47bb-0310-9956-ffa450edef68
2004-10-22 15:22:05 +00:00
Erik Abele
438accf0f9 Minor comment fixes, no code changes:
- 'sub request' -> 'subrequest'
  - @retrn -> @return
  - ...

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105408 13f79535-47bb-0310-9956-ffa450edef68
2004-10-11 19:27:29 +00:00
Allan K. Edwards
500d117c15 parm cast should be DWORD
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105394 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 19:40:47 +00:00
Jeff Trawick
51de48d00a remove dead code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105392 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 14:23:15 +00:00
Allan K. Edwards
ec66d358ff clarify select() usage on Windows
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105391 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 13:49:19 +00:00
Allan K. Edwards
4abcf93fc2 WIN64: fix some windows specific 64bit warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105390 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 13:33:29 +00:00
Allan K. Edwards
b6d4b30466 WIN64: SOCKET is not int on 64bit platforms
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105386 13f79535-47bb-0310-9956-ffa450edef68
2004-10-05 21:04:19 +00:00
Joe Orton
c48cfec2fd * server/util_filter.c (ap_save_brigade): Handle an ENOTIMPL setaside
function correctly.

* modules/generators/mod_cgi.c (cgi_handler): Revert r1.169,
unnecessary CGI bucket lifetime kludge.

PR: 31247


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105297 13f79535-47bb-0310-9956-ffa450edef68
2004-09-26 15:52:51 +00:00
Joe Orton
5eba2483b2 * server/mpm_common.c (dummy_connection): Log the address if the
connect() fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105264 13f79535-47bb-0310-9956-ffa450edef68
2004-09-23 08:59:06 +00:00
Joe Orton
df6a1b30c2 * server/log.c (log_error_core): For APLOG_DEBUG on Unix, if __FILE__
is an absolute path (as in a VPATH build), just log the basename.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105258 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 19:47:51 +00:00
Allan K. Edwards
ba4d908410 WIN64: first in a series to get Windows IA64 builds clean, this serves pages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105257 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 18:21:30 +00:00
Joe Orton
ba6d980639 * server/scoreboard.c (create_namebased_scoreboard): Use
apr_shm_remove() rather than the unsufficient apr_file_remove().

PR: 27189


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105247 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 13:35:31 +00:00
Joe Orton
2b26d10798 * server/protocol.c (ap_rgetline_core): Never NUL terminate at
(*s)[-1] for caller-supplied *s.

Submitted by: Rici Lake <ricilake speedy.com.pe>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105231 13f79535-47bb-0310-9956-ffa450edef68
2004-09-21 21:07:23 +00:00
Nick Kew
72fb770d1a Merge mod_filter with util_filter structs; add API for protocol stuff.
Rename FilterDebug directive to FilterTrace.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105226 13f79535-47bb-0310-9956-ffa450edef68
2004-09-21 10:14:40 +00:00
Joe Orton
91fdc42dc2 * 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>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105215 13f79535-47bb-0310-9956-ffa450edef68
2004-09-20 20:12:20 +00:00
Jeff Trawick
130c053d26 Unix MPMs: Shut down the server more quickly when child processes are
slow to exit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105195 13f79535-47bb-0310-9956-ffa450edef68
2004-09-18 00:33:56 +00:00
Mladen Turk
a536cfe99b Worker shared data has to be visible across all child processes,
so remove creating that data on per-child basis.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105134 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 12:08:39 +00:00
Joe Orton
f2d3d37f2d * server/util.c (ap_resolve_env): Rewrite to avoid buffer overflows.
Submitted by: Andr�� Malo
Reviewed by: jorton, mjc


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105130 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 11:44:05 +00:00