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

2761 Commits

Author SHA1 Message Date
Joshua Slive
5381a672ad Change the default setting of UseCanonicalName to off and remove
that directive from the default config.

This could use some review because it has potential security
implications.  In particular, it could cause cross-site scripting
vulnerabilities if people rely on SERVER_NAME without validating
it.  But we have been running with this in our default config file
for a while, and it vastly reduces the confusion that comes
from people setting ServerName incorrectly.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/simple-conf@160595 13f79535-47bb-0310-9956-ffa450edef68
2005-04-08 20:13:22 +00:00
Greg Ames
2b3ad91040 clone_headers_no_body: remove all entity headers in addition to the
Transfer-Encoding header when creating a GET subrequest



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@159410 13f79535-47bb-0310-9956-ffa450edef68
2005-03-29 18:24:46 +00:00
Greg Ames
235fd33d8f don't propagate input headers describing a body to a subrequest. this can cause a
back end server to hang in a read for a body which no longer exists.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@158798 13f79535-47bb-0310-9956-ffa450edef68
2005-03-23 16:36:45 +00:00
Allan K. Edwards
e807f6b3c3 Fix Windows CompContext buff size miscalculation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@158685 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 21:50:54 +00:00
Paul Querna
1fe9d2eba8 sync with mod_status hacks in the worker mpm.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157810 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 21:48:57 +00:00
Justin Erenkrantz
a80f8410bd Add ReceiveBufferSize directive to control the TCP receive buffer.
Submitted by: Eric Covener <covener gmail.com>
Reviewed by:  Justin Erenkrantz (with minor formatting tweaks)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157583 13f79535-47bb-0310-9956-ffa450edef68
2005-03-15 20:04:58 +00:00
Paul Querna
49ff90cbe3 Add ap_mpm_is_experimental and ap_mpm_is_threaded. Use these instead of checking for specific MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156574 13f79535-47bb-0310-9956-ffa450edef68
2005-03-08 22:40:33 +00:00
Bradley Nicholes
bb35e2f831 Make sure that the secure listen sockets that are created and injected into the ap_listeners lists by mod_nw_ssl are handled correctly so that they remain open and reused across restarts.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156556 13f79535-47bb-0310-9956-ffa450edef68
2005-03-08 18:09:43 +00:00
Jeff Trawick
3e14f16867 worker MPM/mod_status: Support per-worker tracking of pid and
generation in the scoreboard so that mod_status can accurately
represent workers in processes which are gracefully terminating.

New child processes with worker MPM can take over slots of
individual threads within gracefully terminating processes.
Sometimes this is a problem (too many of these gracefully
terminating processes), so it is helpful to have mod_status
provide the information required to recognize these processes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156274 13f79535-47bb-0310-9956-ffa450edef68
2005-03-05 20:06:55 +00:00
Bill Stoddard
8af9f738b1 Win32: Init the args to mpm_service_install(). Prevents nasty things like segfaults
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@155833 13f79535-47bb-0310-9956-ffa450edef68
2005-03-01 22:38:04 +00:00
Bill Stoddard
14aff882b6 Win32: output some useful debug messages when installing the service
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154322 13f79535-47bb-0310-9956-ffa450edef68
2005-02-18 17:05:29 +00:00
Bill Stoddard
5590c522d6 Win32: Move call of mpm_service_install to rewrite_args hook but continue thru post_config to check httpd.conf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154319 13f79535-47bb-0310-9956-ffa450edef68
2005-02-18 16:31:06 +00:00
William A. Rowe Jr
fc979108b0 Fix some symbols which should -not- be exported, and decorate real_exit_code
with ap_ (this symbol must be exported.)  If the others were desired to be
  public, they should have been ap_xxx decorated.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154216 13f79535-47bb-0310-9956-ffa450edef68
2005-02-18 00:00:37 +00:00
William A. Rowe Jr
e681eb22c8 Get httpd-2.1 building once again on win32.
NEVER NEVER screw around with redeclaring AP_ macros and constants.
  If the compiler won't pick them up, e.g., AP_DECLARE, ya've done 
  something wrong from the start.

  All httpd/ap headers depend on httpd.h - plain and simple, so this
  un-convolutes the unusual order here.

  STATIC has become PCRE_STATIC, along with some other odd definitions.
  The only remaining emit is that _pcre_free export is imported, which
  implies something is unusual with the declaration.  Still researching.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154207 13f79535-47bb-0310-9956-ffa450edef68
2005-02-17 23:45:16 +00:00
Paul Querna
22dd8e2949 Remove unused variable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154202 13f79535-47bb-0310-9956-ffa450edef68
2005-02-17 23:18:27 +00:00
Paul Querna
e2d4550b9d *) 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154200 13f79535-47bb-0310-9956-ffa450edef68
2005-02-17 22:53:07 +00:00
Jeff Trawick
68c0bb9ea3 restore google-ability of an ancient message of great importance
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154044 13f79535-47bb-0310-9956-ffa450edef68
2005-02-16 16:44:26 +00:00
Joe Orton
27759dec9a * include/ap_regex.h: Include apr.h not stdlib.h; replace pointless
regoff_t typedef with int; s/size_t/apr_size_t/;.  Comment fixes.

* server/util_pcre.c: s/size_t/apr_size_t/.

* include/httpd.h: Include stdlib.h here instead since many other
files assume it was included by httpd.h at some point.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153407 13f79535-47bb-0310-9956-ffa450edef68
2005-02-11 14:57:34 +00:00
Joe Orton
a0570c8746 Move the POSIX reg* implementations into the ap_* namespace;
internalise the ap_reg*<->PCRE wrapper:

* configure.in: Add srclib/pcre to the include path.

* include/ap_regex.h: Renamed from include/pcreposix.h.  Prefix all
constants with AP_; prefix all functions and types with ap_.  Define
AP_DECLARE to nothing if necessary.  Remove regcomp error codes.

* include/httpd.h: Include ap_regex.h not pcreposix.h.
(ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/.
(ap_regexec, ap_regerror): Prototypes moved to ap_regex.h.

* server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree):
Adjust for ap_ prefixed types.  (ap_regexec, ap_regerror): Removed.

* server/Makefile.in: Build util_pcre.c.

* server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use
of PCRE-internals to do error mapping; rename types to add AP_/ap_
prefixes as above.  Use APR includes.  (ap_regerror): Use apr_snprintf.

* srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la.

* modules/*: Update to use new type and constant names.

PR: 27750 (part one)
Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153384 13f79535-47bb-0310-9956-ffa450edef68
2005-02-11 12:00:41 +00:00
Justin Erenkrantz
e578d12e60 Only recompile buildmark.c when we have to relink httpd.
This allows us to be able to do a make on an up-to-date tree without forcing
a recompile and relink.  Yay!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153266 13f79535-47bb-0310-9956-ffa450edef68
2005-02-10 15:32:05 +00:00
Jeff Trawick
9ff46dd755 Remove formatting characters from ap_log_error() calls. These
were escaped as fallout from CAN-2003-0020.

Submitted by: Eric Covener <ecovener gmail.com>
Reviewed by: Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153105 13f79535-47bb-0310-9956-ffa450edef68
2005-02-09 19:01:43 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Justin Erenkrantz
47d2261318 Fix --with-apr=/usr and/or --with-apr-util=/usr.
PR: 29740
Submitted by: Max Bowsher <maxb ukf.net>
Reviewed by:  Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151255 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 23:39:21 +00:00
Jim Jagielski
9e6b472772 Keep track of time taken to process requests again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149550 13f79535-47bb-0310-9956-ffa450edef68
2005-02-02 19:32:18 +00:00
Bill Stoddard
da635a93a4 Remove upper limit on the LimitRequestFieldSize directive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149269 13f79535-47bb-0310-9956-ffa450edef68
2005-01-31 16:32:18 +00:00
William A. Rowe Jr
6b27462b2f limit_req_fieldsize is signed, correct a signedness error using
a cast since it's not possible to have a negative limit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124283 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 22:21:56 +00:00
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