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

116 Commits

Author SHA1 Message Date
Stefan Fritsch
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
Stefan Fritsch
01ed21af9d Add wrappers for malloc, calloc, realloc that check for out of memory
situations.  Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.

PR 51568, PR 51569, PR 51571.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 16:25:42 +00:00
Jeff Trawick
aca61ab7a5 s/seperate/separate/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137024 13f79535-47bb-0310-9956-ffa450edef68
2011-06-17 21:12:14 +00:00
Stefan Fritsch
c9fd2623da Introduce ap_(get|set)_core_module_config() functions/macros and use them
everywhere.

We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +00:00
Jeff Trawick
46bdc28bf4 fix some logging calls to include the server_rec
(and even the conn_rec in a couple of places)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1074871 13f79535-47bb-0310-9956-ffa450edef68
2011-02-26 15:32:01 +00:00
Jim Jagielski
ddebc67a4e whitespace
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058626 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:10 +00:00
Jim Jagielski
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
Jeff Trawick
3084223f38 running_gen was only set to an interesting value on a path
where it wasn't used before returning from the function; axe it


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@991507 13f79535-47bb-0310-9956-ffa450edef68
2010-09-01 12:10:11 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
William A. Rowe Jr
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
Ruediger Pluem
143e2f91ef * server/scoreboard.c::ap_create_scoreboard
Reset the pointer to ap_logio_get_last_bytes each time we create or reinit an
  existing scoreboard to avoid using an invalid pointer in case mod_logio got
  reloaded to a different address.

Reviewed by: rjung, trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@886324 13f79535-47bb-0310-9956-ffa450edef68
2009-12-02 22:13:54 +00:00
Stefan Fritsch
702b9ec34d Use the new ap_update_child_status_from_conn() to put the client IP into the
scoreboard (and show it in mod_status) as soon as we start reading the request.

Empty the vhost and request fields in ap_update_child_status_from_conn so that
mod_status does not display outdated data if the connection closes without
the request being completely read.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@826530 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 21:38:35 +00:00
Stefan Fritsch
92023763f1 mod_logio: introduce new optional function ap_logio_get_last_bytes to get
total byte count of last request.

core: Use ap_logio_get_last_bytes to report more accurate byte counts in
mod_status if mod_logio is loaded. Without mod_logio, don't increment
counts for HEAD requests.

PR: 25656


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@823337 13f79535-47bb-0310-9956-ffa450edef68
2009-10-08 21:42:13 +00:00
Jeff Trawick
a09941bcff refactor child status update functions to accommodate the addition of
ap_update_child_status_from_conn()

Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821418 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 21:20:40 +00:00
Jim Jagielski
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
Jeff Trawick
e0eb7d1eef 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757853 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 15:43:59 +00:00
Paul Querna
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
Ruediger Pluem
bd49c01685 * Enable the proxy to keep connections persistent in the HTTPS case.
Basicly the persistence is created by keeping the conn_rec structure
  created for our backend connection (whether http or https) in the connection
  pool. This required to adjust scoreboard.c in a way that its functions can
  properly deal with a NULL scoreboard handle by ignoring the call or returning
  an error code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@602542 13f79535-47bb-0310-9956-ffa450edef68
2007-12-08 20:10:29 +00:00
Ruediger Pluem
aaea0c6074 * Use the same declaration for ap_time_process_request as in the header file.
PR: 43789
Submitted by: Tom Donovan <Tom.Donovan acm.org>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@591760 13f79535-47bb-0310-9956-ffa450edef68
2007-11-04 11:20:11 +00:00
Jim Jagielski
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
William A. Rowe Jr
a2597bc596 Actually re-fix Christian's recommendation, someone previously caught this.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587771 13f79535-47bb-0310-9956-ffa450edef68
2007-10-24 03:56:50 +00:00
William A. Rowe Jr
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
Nick Kew
a30598a8a6 PR 40037: try to avoid risk of misleading the lusers when they
can't initialise scoreboard after a crash.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@578620 13f79535-47bb-0310-9956-ffa450edef68
2007-09-24 01:58:50 +00:00
Jim Jagielski
63cdf0cfe6 Some minor cleanups:
1. Rename worker_size, since this could easily be
     confused with the actual MPM worker struct stuff.
  2. Remove superflous ()s in the || test
  3. Add superflous () in the pointer adjusting :)
     Even though C prec rules make it clear what we
     are doing, make it painfully obvious. Remove
     unrequired temp var.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574931 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 12:52:20 +00:00
Jean-Frederic Clere
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
Jim Jagielski
095f3c8e64 Reinsert extern int PROXY_DECLARE_DATA proxy_lb_workers
into the Proxy API. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574052 13f79535-47bb-0310-9956-ffa450edef68
2007-09-09 19:31:46 +00:00
Joe Orton
ada9c28dcf Revert r547987 ("svn merge -c -547987 .")
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551835 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 09:31:11 +00:00
Jim Jagielski
86f602beb2 PID table impl: parent process keeps a local table store of
Apache child process PIDs and uses that to check validity
of what's in the scoreboard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@547987 13f79535-47bb-0310-9956-ffa450edef68
2007-06-16 21:29:24 +00:00
Roy T. Fielding
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
William A. Rowe Jr
5cd174cfcb Make the range test legible; in the process, uncover and close
a bounds overflow condition.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417252 13f79535-47bb-0310-9956-ffa450edef68
2006-06-26 17:41:28 +00:00
Martin Kraemer
be127bbaed Typo (..for use with by the scoreboard) changed to
"..for use by the scoreboard" (not 100% sure -- or
should it be "..for use with the scoreboard"?)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@405665 13f79535-47bb-0310-9956-ffa450edef68
2006-05-10 07:36:54 +00:00
Nick Kew
d0e7d57212 Scoreboard size (Chris Darroch)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@404848 13f79535-47bb-0310-9956-ffa450edef68
2006-05-07 21:00:08 +00:00
Colm MacCarthaigh
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
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +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
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
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
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
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
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
Graham Leggett
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
André Malo
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
André Malo
e88fcf3c64 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:58:22 +00:00
André Malo
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
André Malo
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
Martin Kraemer
d8f10577ef On failures, try to add a hint what went wrong
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99055 13f79535-47bb-0310-9956-ffa450edef68
2003-03-24 08:51:22 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Jeff Trawick
c871b41d3c stop using APLOG_NOERRNO in calls to ap_log_?error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:11:39 +00:00
Aaron Bannert
36a1c908fb Fix a potential size mismatch (apr_off_t might be 64bits on some platforms).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94430 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 06:39:22 +00:00