Commit Graph

95 Commits

Author SHA1 Message Date
67281386ce Merge r1802618, r1820808 from trunk:
core, mpm_event: Add ap_update_sb_handle() to avoid a small memory leak of
sizeof(ap_sb_handle_t) when re-entering event's process_socket().


Follow up to r1802618: CHANGES entry.


Proposed by: ylavic
Reviewed by: ylavic, icing, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1821069 13f79535-47bb-0310-9956-ffa450edef68
2018-01-13 15:36:38 +00:00
df3270029b Merge r1706595 from trunk:
Follow-up to r1702948:

APR_HAVE_foo is checked via #if, not #ifdef (since it should always be
defined, to either 0 or 1)

This fixes a compile error on Windows introduced by r1702948
as well as straightens up two long-time glitches.


Submitted by: trawick
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1774626 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 15:44:07 +00:00
5c0a8f2f69 Merge r1702948, r1759415 from trunk:
httpd compiles warning free on gcc and every new warning will be treated as an error, standard c-89 is enforced

http_config: follow up to r1702948: maybe unused, yet maybe usefull too.
Submitted by: icing, ylavic
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1772330 13f79535-47bb-0310-9956-ffa450edef68
2016-12-02 11:36:06 +00:00
5eb5ad717f merging pre_close_connection hook, prep_lingering_close and ap_update_child() additions from trunk
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1732275 13f79535-47bb-0310-9956-ffa450edef68
2016-02-25 10:27:27 +00:00
8e684412e1 MPMs: Support SO_REUSEPORT to create multiple duplicated listener
records for scalability.

Submitted by: Yingqi Lu <yingqi.lu@intel.com>, Jeff Trawick,
              Jim Jagielski, Yann Ylavic

Reviewed by: ylavic, jim, minfrin


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1705492 13f79535-47bb-0310-9956-ffa450edef68
2015-09-26 22:20:14 +00:00
4bbf0508ea Merge 1610491 from trunk:
SECURITY (CVE-2014-0226): Fix a race condition in scoreboard handling,
which could lead to a heap buffer overflow.  Thanks to Marek Kroemeke
working with HP's Zero Day Initiative for reporting this.

* include/scoreboard.h: Add ap_copy_scoreboard_worker.

* server/scoreboard.c (ap_copy_scoreboard_worker): New function.

* modules/generators/mod_status.c (status_handler): Use it.

* modules/lua/lua_request.c (lua_ap_scoreboard_worker): Likewise.

Reviewed by: trawick, jorton, covener, jim
Submitted by: jorton, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1610499 13f79535-47bb-0310-9956-ffa450edef68
2014-07-14 19:55:04 +00:00
577acc2d12 Revert r1373105, the merging of incompatible DefaultRuntimeDir
changes.

The trunk patches for these all have some configuration breakage
as 2.4.x interprets the individual directive or API parameter as
relative to ServerRoot whereas trunk interprets everything
relative to DefaultRuntimeDir.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1373168 13f79535-47bb-0310-9956-ffa450edef68
2012-08-14 23:59:24 +00:00
f8c5165c28 Merge r1364695, r1369477, r1369808, r1370288, r1370225, r1370763, r1371684 from trunk:
mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/
DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file.


core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the
scoreboard (ScoreBoardFile).


The Pidfile directive and ap_log_pid()/ap_remove_pid()/ap_read_pid()
now respect DefaultRuntimeDir


Mutex directive: finish support of DefaultRuntimeDir

a partial conversion was made in r1299718, but I'm not
sure when that change is effective


mod_socache_shmcb and mod_socache_dbm: finish support of
DefaultRuntimeDir

a partial conversion was made in r1299718, affecting cases
where no filename was specified


mod_slotmem_plain: make the "filename" key relative to
DefaultRuntimeDir if not absolute

mod_slotmem_plain does not externalize or check the full path
in any way, so this change is just for consistency with other
modules which build paths to run-time artifacts.


make LDAPSharedCacheFile relative to DefaultRuntimeDir

Submitted by: trawick
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1373105 13f79535-47bb-0310-9956-ffa450edef68
2012-08-14 21:08:35 +00:00
a82d6f2665 Merge r1303201, r1303435, r1303827:
* Revert r1294936 (Jeff's revert) and fix NetWare / Win32 build.
  Added the missing AP_DECLARE* decorations for the function 
  implementations and variables.

* Fix changes in parameter names in function definitions done in r1303201

* Partly revert r1303435 and rename pconf back to in_pconf to avoid shadowing
  the global variable with the same name and create a bogus assignment.

  Pointed out by: Eric Covener

Committed by: fuankg, rpluem
Reviewed by: fuankg, minfrin, trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1307828 13f79535-47bb-0310-9956-ffa450edef68
2012-03-31 15:34:59 +00:00
6816e9ff0f Align 2.4 w/ trunk... since 2.4.0 was never released, API change is OK.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1239125 13f79535-47bb-0310-9956-ffa450edef68
2012-02-01 13:36:37 +00:00
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
18fdb9d711 Some improvements for handling of many connections for MPM event:
- Process lingering close asynchronously instead of tying up worker threads
  (based on patch by Jeff Trawick).

- If the number of connections of a process is above

     threads_per_child  +  WORKER_OVERCOMMIT * (idle_workers - 1)

  (WORKER_OVERCOMMIT is fixed at 2, at the moment), or if all workers are busy,
  don't accept new connections in that process. Such a dynamic connection limit
  is necessary because we may have both async and non-async (ssl) connections.
  WORKER_OVERCOMMIT should be a config option.

- Don't count idle workers of not-accepting processes against MinSpareThreads,
  so that the parent will spawn new processes when necessary.

- If we receive a keep-alive request while all workers are busy, don't block
  but close the connection immediately so that the client will re-connect to a
  different process.

Related changes:

- Log what is going on at trace loglevels.
- Remove the bypass_push poll type flag, this code cannot be hit anymore
  (if it ever could?).
- Add some macro helpers for dealing with timeout queues.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137358 13f79535-47bb-0310-9956-ffa450edef68
2011-06-19 12:23:42 +00:00
2aef21903c Cleanup... most don't need apr_hooks.h at all...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101067 13f79535-47bb-0310-9956-ffa450edef68
2011-05-09 15:36:32 +00:00
daa5a5c57c OK... a good commit point (we don't quite compile yet though...)
Pull out the worker scoreboard cruft and start moving most
worker stuff to shm. Use slotmem for workers and provide
space for growth.

Redo logic:

  ap_proxy_define_*
  ap_proxy_create_*
  ap_proxy_initialize_*

Right now just for workers, but lay framework for balancers
as well. The idea is to break out the functional parts
to make it easy for dynamics. Defining is simply describing
the worker, and tucking that info away. When we create, we
go ahead and create the shared memory, etc... Initialize
is simply to allow child process to access the shm...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058622 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:50 +00:00
ed451e94d1 re-order many struct members for better alignment on 64bit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@959464 13f79535-47bb-0310-9956-ffa450edef68
2010-06-30 22:34:05 +00:00
78cf8c9212 Refactor mod_status out of the ExtendedStatus toggle picture, as other
modules can and should be able to use this scoreboard information.
Rename suggestions for such a directive are welcomed.

Note that mod_status toggles the default, to present the ExtendedStatus 
for server operators, whenever it is loaded.  Docs changes to follow.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903020 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 00:05:37 +00:00
e583784a18 remove declaration for ap_my_generation, which was replaced with the
AP_MPMQ_GENERATION query in r757853


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831944 13f79535-47bb-0310-9956-ffa450edef68
2009-11-02 16:26:51 +00:00
abcfac33f8 Provide new ap_update_child_status_from_conn() mostly
for use with mod_noloris.c Add some logic protection, for
NULL ref, which shoulda be there in any case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821307 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 12:54:35 +00:00
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
798fb22128 Remove unused sb_type member from process_score structure and
do major MMN bump.  The sb_type field was added in r89115 but not
removed in r89554 along with related unused additions.

Submitted by: Torsten Foertsch <torsten.foertsch@gmx.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726118 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 21:05:37 +00:00
a73acf02f6 API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
809dd5e30b Add in SeeRequestTail directive, to handle the shortcoming
of only storing 63 bytes of the request, when the requests
are longer than that and only vary towards the end; eg:

   GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/apples.jpg
   GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/pears.jpg
   GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/plums.jpg



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@590641 13f79535-47bb-0310-9956-ffa450edef68
2007-10-31 12:19:54 +00:00
a412407a72 The function ap_time_process_request() needs to be declared appropriately if it is going to be used externally (now being called by mod_echo)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@590122 13f79535-47bb-0310-9956-ffa450edef68
2007-10-30 15:46:06 +00:00
f75745f995 MMN major bump required; this API is altogether inconsistent, transparent
types should be opaque, opaque types should be transparent.

Solve one aspect, follow the _by_indexes() example for ap_get_scoreboard_worker
family of functions, and the primary one will now accept the abstracted conn_rec
value of sbh to find that connections slot.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587770 13f79535-47bb-0310-9956-ffa450edef68
2007-10-24 03:50:24 +00:00
cb6949285d lb_score is bigger proxy_worker_stat. Prevent wasting space.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574843 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 08:34:40 +00:00
38c463cacf Yeah. Good luck with that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574270 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 14:54:37 +00:00
5437e234f7 Maintain the illusion. It's not worth my time or
energy to care about this anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574269 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 14:54:01 +00:00
0703f437c0 Reinstate the lb_score patch, but, protect against
conflicting leakage as per jfc proposal.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573569 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 13:13:37 +00:00
4aee21f5b6 semi-revert 573264. It is totally bogus that we
need to do this, but until we create mod_proxy_structs.h
which can then be included by mod_proxy.h as well as scoreboard.h,
we'll make do.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573555 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 11:58:38 +00:00
c3d947ef89 lb_score *is* proxy_worker_stat... no need to "mask" that
or use wasted space.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573264 13f79535-47bb-0310-9956-ffa450edef68
2007-09-06 13:46:46 +00:00
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
25a2aca974 Tidy up scoreboard.h (Chris Darroch)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@404849 13f79535-47bb-0310-9956-ffa450edef68
2006-05-07 21:01:48 +00:00
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +00:00
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
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
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
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
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
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
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
7262ac8dca Improve binary compatiblity. This fix was requested of me before it was committed, but it went in anyway - my bad :(
PR:
Obtained from:
Submitted by:	Mladen Turk <mturk@apache.org>
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104409 13f79535-47bb-0310-9956-ffa450edef68
2004-07-29 15:18:40 +00:00
e548632412 Add load balancer support to the scoreboard in preparation for
load balancing support in mod_proxy.
PR:
Obtained from:
Submitted by:	Mladen Turk <mturk@apache.org>
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104404 13f79535-47bb-0310-9956-ffa450edef68
2004-07-28 22:50:54 +00:00
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
129635b965 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102548 13f79535-47bb-0310-9956-ffa450edef68
2004-02-07 19:27:57 +00:00
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
536cfa19ee Syncing makes no sense now
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94309 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 16:21:48 +00:00