1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

4114 Commits

Author SHA1 Message Date
Christophe Jaillet
80e41b5819 Tweak a AP_DEBUG_ASSERT condition.
Valid index to use 'req_header_var_names' are 0...6

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1595321 13f79535-47bb-0310-9956-ffa450edef68
2014-05-16 19:37:07 +00:00
Mike Rumph
ebd3ed2bf8 Fix some comment typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594301 13f79535-47bb-0310-9956-ffa450edef68
2014-05-13 17:50:39 +00:00
Eric Covener
fba67798ed PR56333: Add an API to resume a connection that a handler has previously suspended.
Submitted by: Artem <artemciy gmail.com>, Edward Lu <Chaosed0 gmail.com>
Committed by: covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593860 13f79535-47bb-0310-9956-ffa450edef68
2014-05-11 20:52:32 +00:00
Eric Covener
d758951456 Extend the socket callbacks in event to allow a timeout on the I/O callback.
When a socket callback has a timeout, an associated timer event is used to 
remove the sockets from the pollset and call a timeout function.

* This includes a noteworthy change to the main event loop. Previously,
we would call epoll, then process the timer events, then iterate through the
poll results. After this patch, the timer events are processed before the poll()
a _non-queued_ action can change the pollset conents (a users timed callback
function conversely could easily sit in a queue while the main thread continues
down into epoll)

* timer events can now have sockets associated with them, those sockets are 
removed from the pollset when the timer event fires w/o a queue to the worker.

* timer events now have a canceled flag that can be toggled without locking
the timer list. 

* Drop the severity of some wstunnel messages from DEBUG to TRACE1

* Lift the restriction on using asynchronous websockets connections but having
an idle timeout



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593857 13f79535-47bb-0310-9956-ffa450edef68
2014-05-11 20:41:45 +00:00
Graham Leggett
1c88c53282 Only include the ldap escaping if present within APR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589995 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 11:19:56 +00:00
Graham Leggett
7c05d5e069 Add the ldap function to the expression API, allowing LDAP filters and
distinguished names based on expressions to be escaped correctly to
guard against LDAP injection.

Note: this requires at least APR v1.6.0 or above for the apr_escape API.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589986 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 10:55:04 +00:00
Christophe Jaillet
075cd89e14 Follow up to r1384924 .
Update comment and allocate one extra byte to be safe, even if not needed in the particular case described in r1384924.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589599 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 06:29:28 +00:00
Christophe Jaillet
053a9e569a Better self document code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588852 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 06:51:36 +00:00
Eric Covener
360c8f35f5 r1494157 from eventopt for event, per sf's review comments.
use a subpool of pchild since skiplist allocations will
happen across threads and are only protected from
other skiplist operations.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588806 13f79535-47bb-0310-9956-ffa450edef68
2014-04-20 17:53:38 +00:00
Graham Leggett
a3dca551c1 Move two variable assignments off the fast path.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588448 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 11:47:06 +00:00
Jim Jagielski
8feaa1f1e3 And use #error if we get past configure...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1579267 13f79535-47bb-0310-9956-ffa450edef68
2014-03-19 15:45:42 +00:00
Yann Ylavic
14f915694e core: avoid a double apr_time_now() call on the first succeeding read.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572905 13f79535-47bb-0310-9956-ffa450edef68
2014-02-28 10:22:26 +00:00
Jeff Trawick
ebfa4e231d Follow-up to r1512819:
Don't include "\" in the printable form of the data because
it will be escaped later in processing, and the extra escaping
throws off the alignment.  Just filter it out like unprintable
characters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565777 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 19:54:06 +00:00
Jim Jagielski
abb4760f84 typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565763 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 18:56:49 +00:00
Jim Jagielski
ea4859bfb1 Oops... missed this when I switched slaves to their
own struct (for ease of use w/ arrays)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565717 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 16:44:57 +00:00
Jim Jagielski
b122567955 Add in the concept of "slave" connections...
Allows for several "connections" all resulting in
a single real connection that talks to the network.
Right now, nothing uses this though.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565657 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 13:54:38 +00:00
Ruediger Pluem
fea24799cf * Only use PCRE_DUPNAMES if it is present (only in more recent versions of PCRE)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1564439 13f79535-47bb-0310-9956-ffa450edef68
2014-02-04 19:39:18 +00:00
Christophe Jaillet
1b6e2b3ebf s/apr_pstrndup/apr_pstrmemdup/ when applicable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563381 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 08:26:33 +00:00
Christophe Jaillet
dfa5c28120 Use %pm in order to save 8k of stack in 'ap_pcfg_strerror'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563379 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 07:55:58 +00:00
Jim Jagielski
3da00d392d just put up w/ the error message... no real way to
do this :/

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561184 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 21:16:54 +00:00
Jim Jagielski
0311d6aeb4 Use simple macro ifdef rather than APR versioning...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561150 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 20:24:36 +00:00
Jim Jagielski
f725b1e105 If we try to set this on a UDS socket, don't log the error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561109 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 18:53:15 +00:00
Christophe Jaillet
4719522d98 No need to test for NULL, apr_pstrndup already handles it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1559351 13f79535-47bb-0310-9956-ffa450edef68
2014-01-18 15:07:38 +00:00
Graham Leggett
4fecd089c4 Add a "MATCH_" prefix to variables set within
LocationMatch/DirectoryMatch/FilesMatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555266 13f79535-47bb-0310-9956-ffa450edef68
2014-01-03 22:26:55 +00:00
Jim Jagielski
a20df5d2d0 new logno
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554522 13f79535-47bb-0310-9956-ffa450edef68
2013-12-31 14:35:41 +00:00
Justin Erenkrantz
93143eb07b Add directives to control two protocol options:
HttpContentLengthHeadZero - allow Content-Length of 0 to be returned on HEAD
 HttpExpectStrict - allow admin to control whether we must see "100-continue"

This is helpful when using Ceph's radosgw and httpd.

Inspired by: Yehuda Sadeh <yehuda@inktank.com>
See https://github.com/ceph/apache2/commits/precise

* include/http_core.h
  (core_server_config): Add http_cl_head_zero and http_expect_strict fields.
* modules/http/http_filters.c
  (ap_http_header_filter): Only clear out the C-L if http_cl_head_zero is not
  explictly set.
* server/core.c
  (merge_core_server_configs): Add new fields.
  (set_cl_head_zero, set_expect_strict): New config helpers.
  (HttpContentLengthHeadZero, HttpExpectStrict): Declare new directives.
* server/protocol.c
  (ap_read_request): Allow http_expect_strict to control if we return 417.
* include/ap_mmn.h
  (MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR): Bump.
* CHANGES: Add a brief description.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554303 13f79535-47bb-0310-9956-ffa450edef68
2013-12-30 20:01:14 +00:00
Graham Leggett
43e022f007 core: Support named groups and backreferences within the LocationMatch,
DirectoryMatch, FilesMatch and ProxyMatch directives.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554300 13f79535-47bb-0310-9956-ffa450edef68
2013-12-30 19:50:52 +00:00
Christophe Jaillet
b8215bb0ed Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1551013 13f79535-47bb-0310-9956-ffa450edef68
2013-12-15 10:37:06 +00:00
Jeff Trawick
f496d571a3 Fix module id in log messages issued from main.c
Submitted by: rjung



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1547065 13f79535-47bb-0310-9956-ffa450edef68
2013-12-02 15:42:34 +00:00
Christophe Jaillet
553054d0ba Fix missing spaces in messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546860 13f79535-47bb-0310-9956-ffa450edef68
2013-12-01 21:13:56 +00:00
Jeff Trawick
58f5ac2464 avoid duplication of APR_HOOK_LINK invocations
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546836 13f79535-47bb-0310-9956-ffa450edef68
2013-12-01 18:51:04 +00:00
Jeff Trawick
a135988f0c Follow-up to r1546759: Fix compilation when exception hooks aren't enabled.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546835 13f79535-47bb-0310-9956-ffa450edef68
2013-12-01 18:46:56 +00:00
Jeff Trawick
5b4178100c follow-up to r1546759: remove an inadvertently committed testcase
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546760 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 18:00:59 +00:00
Jeff Trawick
540be85c46 Add suspend_connection and resume_connection hooks to notify modules
when the thread/connection relationship changes.  (Currently implemented
only for the Event MPM; should be implemented for all async MPMs.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546759 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 17:56:25 +00:00
Jeff Trawick
2571d1f90c fix whitespace in a debug message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546730 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 14:06:55 +00:00
Jeff Trawick
88e5f7cc40 Follow-up to r1538490:
Ensure that conn_rec->sbh is always cleared when returning from process_socket().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545736 13f79535-47bb-0310-9956-ffa450edef68
2013-11-26 17:11:51 +00:00
Jim Jagielski
18070dd81a Consistent types (2nd commit for future backport ease)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545412 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:24:20 +00:00
Jim Jagielski
a6b32ed9a4 Consistent types
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545411 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:24:18 +00:00
Jim Jagielski
d21042e2a8 naming suggestion re: trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545408 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:10:05 +00:00
Jim Jagielski
43625092ad Use offset which is smack dab in the middle.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545364 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 18:28:53 +00:00
Jim Jagielski
cc4921ed2f Use correct type...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545325 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 15:40:16 +00:00
Jim Jagielski
6eb75cff89 r1545286 for eventopt
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545292 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 14:08:17 +00:00
Jim Jagielski
7e75c89341 Use a normalized offset point for idlers... still need to worry
that atomics work as "expected", in this case that a add32 of a -1
is the "same" as dec32 (as far as effect on idlers)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545286 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 13:59:06 +00:00
Jim Jagielski
320f4d382e revert 1544876
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545130 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 01:32:53 +00:00
Jim Jagielski
ab81fdf796 Just critically warn people... but keep pushing through.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544876 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 20:29:55 +00:00
Jeff Trawick
d26fb3d0d9 Follow-up to r1539988:
Make sure an error log provider has initialized before trying to log to it.
(A log function may be called in a window between closing stderr and opening logs.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1543979 13f79535-47bb-0310-9956-ffa450edef68
2013-11-20 22:54:37 +00:00
Christophe Jaillet
baa588a08b Remove useless spaces that are not in 2.4.x
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542799 13f79535-47bb-0310-9956-ffa450edef68
2013-11-17 19:42:41 +00:00
Jeff Trawick
30f8aa6460 more apr_file_write_full() simplification (like r1542413)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542416 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 22:03:16 +00:00
Jim Jagielski
62bb83d16f PR: 54852. Only use a dummy_connection for idle processes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542379 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 19:29:11 +00:00
Jeff Trawick
2ab496bc50 Fix potential rejection of valid MaxMemFree and ThreadStackSize
directives.

Submitted by: Mike Rumph <mike.rumph oracle.com>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542338 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 17:35:16 +00:00