1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00
Commit Graph

4268 Commits

Author SHA1 Message Date
Jeff Trawick
2855063133 Fix CGIPassAuth built-in directive documentation,
Get compatibility line in doc ready for backport

Pointed out by: rjung (who perhaps wasn't so positive about the eventual 2.4.x release)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673155 13f79535-47bb-0310-9956-ffa450edef68
2015-04-13 10:50:02 +00:00
Kaspar Brand
5a6a4b52ec UNSET the VirtualHost's LogLevel just before calling ap_merge_log_config(),
to make sure that the DEFAULT_LOGLEVEL (APLOG_WARNING) is also in effect
when ap_process_config_tree() in main.c:main() walks through the
VirtualHost sections.

See https://mail-archives.apache.org/mod_mbox/httpd-dev/201404.mbox/%3C535CC85B.80501%40velox.ch%3E
for one case this is addressing. This reverts the change from r1024427 on
the one hand, but still ensures correct LogLevel merging on the other hand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672014 13f79535-47bb-0310-9956-ffa450edef68
2015-04-08 07:33:39 +00:00
Yann Ylavic
621813b6c2 core_filters: restore/disable TCP_NOPUSH option after non-blocking sendfile.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669289 13f79535-47bb-0310-9956-ffa450edef68
2015-03-26 08:15:32 +00:00
Yann Ylavic
9d0ce44185 core: follow up to r1668532: always initialize optional_fn pointers in ap_create_scoreboard().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1668553 13f79535-47bb-0310-9956-ffa450edef68
2015-03-23 08:52:47 +00:00
Yann Ylavic
9a5dd3df94 core: Initialize scoreboard's used optional functions on graceful restarts to
avoid a crash when relocation occurs.  PR 57177.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1668532 13f79535-47bb-0310-9956-ffa450edef68
2015-03-23 08:07:18 +00:00
Yann Ylavic
f6090114a8 core: Cleanup the request soon/even if some output filter fails to
handle the EOR bucket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1666998 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 13:52:39 +00:00
Yann Ylavic
27a347d2fa mpm_motorz: follow up to r1666482.
We only need one compare function for add semantic with apr_skiplist_insert()
and unique timers (pointers). It also works with apr_skiplist_remove() and
apr_skiplist_find().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1666619 13f79535-47bb-0310-9956-ffa450edef68
2015-03-14 00:09:32 +00:00
Yann Ylavic
b222ad355c mpm_event: follow up to r1666468.
We only need one compare function for add semantic with apr_skiplist_insert()
and unique timers (pointers). It also should work with apr_skiplist_remove()
and apr_skiplist_find(), be they used some day.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1666618 13f79535-47bb-0310-9956-ffa450edef68
2015-03-14 00:06:21 +00:00
Jim Jagielski
c29a21c8f0 work w/ apr_skiplist_insert()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1666482 13f79535-47bb-0310-9956-ffa450edef68
2015-03-13 15:27:36 +00:00
Yann Ylavic
c8bfc84832 mpm_event: Allow for timer events duplicates.
Meanwhile ap[r]_skiplist_add()...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1666468 13f79535-47bb-0310-9956-ffa450edef68
2015-03-13 14:47:50 +00:00
Yann Ylavic
0a431ef862 core, modules: like r1657897 but for core and other modules than mod_proxy.
More uses of ap_map_http_request_error() and AP_FILTER_ERROR so that we never
return an HTTP error status from a handler if some filter generated a response
already.

That is, from a handler, either ap_get_brigade() (an input filter) returned
AP_FILTER_ERROR and we must forward it to ap_die(), or ap_pass_brigade() (an
output filter) failed with any status and we must return AP_FILTER_ERROR in
any case for ap_die() to determine whether a response is needed or not.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665625 13f79535-47bb-0310-9956-ffa450edef68
2015-03-10 17:25:17 +00:00
Yann Ylavic
c87a18ddef motorz: add and use the timer event of the connection.
Set current_thread before calling timer callback.

Use KeepAliveTimeout for CONN_STATE_CHECK_REQUEST_LINE_READABLE.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665495 13f79535-47bb-0310-9956-ffa450edef68
2015-03-10 12:09:34 +00:00
Yann Ylavic
3276f4689f motorz: revert bogus r1665381.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665385 13f79535-47bb-0310-9956-ffa450edef68
2015-03-09 23:39:05 +00:00
Yann Ylavic
d6bcf7e4f2 motorz:
Fix access to timer's pool from different threads (timer_event_process).
Set current_thread before calling timer callback.

Reuse timers by using spare_timers from motorz core (acquire/release_timer).

Use KeepAliveTimeout for CONN_STATE_CHECK_REQUEST_LINE_READABLE.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665381 13f79535-47bb-0310-9956-ffa450edef68
2015-03-09 23:11:45 +00:00
Jim Jagielski
627711af7f use pollset impl instead of pollcb
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665317 13f79535-47bb-0310-9956-ffa450edef68
2015-03-09 18:26:13 +00:00
Jim Jagielski
d99de44063 we need sbh and might as well have some debug
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665270 13f79535-47bb-0310-9956-ffa450edef68
2015-03-09 15:59:29 +00:00
Yann Ylavic
551fe1294d core: Follow up to r1664205.
Don't let invalid r->proto_num/protocol out of read_request_line() reach
the output filters (when responding with 400 Bad Request).
Suggested by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664576 13f79535-47bb-0310-9956-ffa450edef68
2015-03-06 09:55:16 +00:00
Jim Jagielski
c1f457ee8c Some fluff
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664478 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 20:36:29 +00:00
Jim Jagielski
e45efc0e3c Move statics
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664449 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 18:39:55 +00:00
Jim Jagielski
7d8f15ae04 Fix errors and mistakenly removed rets
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664443 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 18:16:47 +00:00
Jim Jagielski
5f7f872c23 Don't return
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664358 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 14:35:39 +00:00
Jim Jagielski
227e696228 Move to traditional C header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664357 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 14:35:37 +00:00
Ruediger Pluem
8e7ee48c9a * Setup the usual svn:ignore properties for MPM's
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664283 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 09:03:56 +00:00
Eric Covener
be0f5335e3 *) SECURITY: CVE-2015-0253 (cve.mitre.org)
core: Fix a crash introduced in with ErrorDocument 400 pointing
     to a local URL-path with the INCLUDES filter active, introduced
     in 2.4.11. PR 57531. [Yann Ylavic]


Submitted By: ylavic
Committed By: covener





git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664205 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 02:33:16 +00:00
Jim Jagielski
6914970982 We no longer need eventopt.
And might as well be a good time to add motorz in to trunk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664077 13f79535-47bb-0310-9956-ffa450edef68
2015-03-04 17:17:53 +00:00
Yann Ylavic
df173b940d core: If explicitly configured, use the KeepaliveTimeout value of the
virtual host which handled the latest request on the connection, or by
default the one of the first virtual host bound to the same IP:port.

For non-async MPMs, use either r->server's or c->base_server's value in
ap_process_http_sync_connection() depending on a new server_rec's flag
called keep_alive_timeout_set and determined at config time.

For event MPM, use a queue per timeout value, chaining the queues per
type (keepalive wrt KeepAliveTimeout, write completion wrt to Timeout)
so that maintenance can be done on all the queues from the head, and such
that insertions/maintenance remain in O(1).
A server config is created and pointing to the queue of each vhost at
post_config time, hence the config can be associated to the connection
state (cs) at post_read_request time (keep_alive_timeout_set is used to
determine r->server vs c->base_server here), and we can simply insert
with TO_QUEUE_INSERT(cs->sc->q, cs).  PR56226.

While at it, since each queue now embeds it own timeout and hence the
expiration_time of the cs has changed to a queue_timestamp (the time it
was queued), we can detect clock skews and expire entries immediatly if
the system is set (eg. far) in the past during runtime and we want to
avoid waiting for (eg.) centuries before the current logic kills them.
Any entry which is registered above now + q->timeout is concerned, and
is now cleaned from the queue when encountered.  PR57374.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664071 13f79535-47bb-0310-9956-ffa450edef68
2015-03-04 16:58:01 +00:00
Yann Ylavic
284a0e08f1 mpm_event: follow up to r1538490, r1545736, r1604350, r1639614 and r1642868.
Clear and restore sbh in notify_suspend() and notify_resume() respectively.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1663017 13f79535-47bb-0310-9956-ffa450edef68
2015-03-01 00:44:49 +00:00
Yann Ylavic
b3d7491b04 mpm_event: follow up to r1493741 and r1662440.
Really fix style by not introducing tabs...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1662441 13f79535-47bb-0310-9956-ffa450edef68
2015-02-26 13:18:10 +00:00
Yann Ylavic
3fca989443 mpm_event: follow up to r1493741.
Fix typo (and style) for event_unregister_socket_callback()'s final result.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1662440 13f79535-47bb-0310-9956-ffa450edef68
2015-02-26 13:16:19 +00:00
Yann Ylavic
9aa869ec41 mpm_{worker,prefork}: save some cycles by not copying the listener's pollfds
for each pollset operation.

We don't need a copy when poll()ing if those are allocated with the correct
lifetime (the listener thread) at the very beginning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1662437 13f79535-47bb-0310-9956-ffa450edef68
2015-02-26 12:54:23 +00:00
Jeff Trawick
186eda9371 axe unused variables
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1661486 13f79535-47bb-0310-9956-ffa450edef68
2015-02-22 15:32:48 +00:00
Graham Leggett
9850539bd7 core: Add expression support to ErrorDocument. Switch from a fixed
sized 664 byte array per merge to a hash table.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1661448 13f79535-47bb-0310-9956-ffa450edef68
2015-02-21 23:59:05 +00:00
Christophe Jaillet
b8e33f6f61 Save a few bytes in conf pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1660800 13f79535-47bb-0310-9956-ffa450edef68
2015-02-19 06:37:21 +00:00
Christophe Jaillet
609dbae292 Tab vs space
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657949 13f79535-47bb-0310-9956-ffa450edef68
2015-02-06 20:25:21 +00:00
Christophe Jaillet
25a2e41ea7 Save a few bytes in conf pool when parsing some directives. Use temp_pool when applicable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657692 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 21:03:04 +00:00
Rainer Jung
7439a429d6 Expression parser: Optimize another concatenation
case by using iteration instead of recursion.

We have a relatively small recursion limit of
about 10 operations. This is a compilation
limit (a define). It can be hit if many expr
vars or function calls are concatenated.

The new optimization is very similar to the
existing one, which optimizes consecutive
concatenations in node2 of the tree. The new
one optimizes consecutive concatenations in
node 1.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657685 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 20:33:59 +00:00
Eric Covener
c2d3d469ca correct copy/paste error, use cmd->cmd->name
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656122 13f79535-47bb-0310-9956-ffa450edef68
2015-01-30 21:11:36 +00:00
Eric Covener
adcd01df7c Block Define/Undefine from per-directory context, because they will
fire while the block is read not when it evaluates for a given
request.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656063 13f79535-47bb-0310-9956-ffa450edef68
2015-01-30 17:17:12 +00:00
Eric Covener
2154a9de68 Provide a way for EXEC_ON_READ directives to see their context
(parent directive).

Usually, this context is not also EXEC_ON_READ so it's not fully processed, so
e.g cmd->path is not fluffed up yet because the closing tag
of the section is not read yet and ap_check_cmd_context()
doesn't work)




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656058 13f79535-47bb-0310-9956-ffa450edef68
2015-01-30 16:58:20 +00:00
William A. Rowe Jr
0271656a56 Revert r4635428 corresponding to PR41867.
The code reverted attempted to restrict comparisons of the r->filename
to given DirectoryMatch blocks.

r->filename was already a non-directory entity at this point, because we
have already fallen out of the } while (thisinfo.filetype == APR_DIR);
block above.

The addition of r->d_is_directory was redundant.  That is what is always
returned by ap_get_core_module_config(r->per_dir_config).

Note modifying dir_config required an MMN major bump as this commit could
have realigned the offset of refs (had it been added to the end, this
would correspond to an mmn minor bump) and other fields packed into the
same bytes (this is undefined). Bump on revert to prevent unexpected crashes.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653666 13f79535-47bb-0310-9956-ffa450edef68
2015-01-21 21:39:55 +00:00
Eric Covener
48d36db55b r1651088 for eventopt
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1651089 13f79535-47bb-0310-9956-ffa450edef68
2015-01-12 13:45:30 +00:00
Eric Covener
8197971bce Update conn_rec.id when a new thread begins working on a connection, because
the old thread may work on a new connection and assign the same ID in parallel.


Submitted By:  Michael Thorpe
Committed By: covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1651088 13f79535-47bb-0310-9956-ffa450edef68
2015-01-12 13:42:31 +00:00
Eric Covener
e0b79f44a9 Configuration files with long lines and continuation characters
are not read properly. PR 55910. 

Submitted By: Manuel Mausz <manuel-as mausz.at>
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1648394 13f79535-47bb-0310-9956-ffa450edef68
2014-12-29 17:27:46 +00:00
Eric Covener
829e98c57d looks like debug left in r1642154
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1647125 13f79535-47bb-0310-9956-ffa450edef68
2014-12-21 11:47:26 +00:00
Yann Ylavic
3f0d0a66bd util_expr: sync bison generated source files with according
to changes on server/util_expr_parse.y from r1642154.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643929 13f79535-47bb-0310-9956-ffa450edef68
2014-12-08 21:20:50 +00:00
Yann Ylavic
8b77d7e81f Revert r1643900.
May someone with a bison version closer to the original one make this change.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643901 13f79535-47bb-0310-9956-ffa450edef68
2014-12-08 20:06:24 +00:00
Yann Ylavic
3415691b45 util_expr: sync bison generated source files with
server/util_expr_parse.y from r1642154.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643900 13f79535-47bb-0310-9956-ffa450edef68
2014-12-08 19:46:53 +00:00
Yann Ylavic
bfdb0ece3e * core: Fix -D[efined] or <Define>[d] variables lifetime accross restarts.
PR 57328.

Submitted-by: Armin Abfalterer <a.abfalterer gmail.com>
Reviewed/Committed-by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643825 13f79535-47bb-0310-9956-ffa450edef68
2014-12-08 14:29:13 +00:00
Yann Ylavic
e6d70ea7bc mpm_event(opt): zero is immutable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643284 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 14:00:37 +00:00
Yann Ylavic
62da621f82 mpm_worker: replace apr_atomic_cas32(+1) loop with the more performant
apr_atomic_inc32().
Also declare fd_queue_info_t's idlers member as volatile since it is
used outside atomic functions (or it could be optimized out by the
compiler).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643282 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 13:54:30 +00:00