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

8865 Commits

Author SHA1 Message Date
Ruediger Pluem
a902bda003 * Give ap_proxy_post_request as chance to act correctly on the status code
by setting r->status temporarily to access_status. r->status might be
  different than access_status e.g. r->status could be HTTP_OK if e.g. we
  override the error page on the proxy or if the error was not generated
  by the backend itself but by the proxy e.g. a bad gateway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1597352 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 20:55:52 +00:00
Ruediger Pluem
3adb3b8bf3 * Hand out the same DH structure in ssl_callback_TmpDH set by
SSL_CTX_set_tmp_dh_callback though once generated as we leak
  memory otherwise and freeing the structure up after use would be
  hard to track and in fact is not needed at all as it is safe to
  use the same parameters over and over again security wise (in
  contrast to the keys itself) and code safe as the returned structure
  is duplicated by OpenSSL anyway. Hence no modification happens
  to our copy.

Observed by: rjung
Reviewed by: kbrand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1597349 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 20:28:56 +00:00
Christophe Jaillet
58dedee7d5 Save a few bytes of memory. This can be done in temp_pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1597182 13f79535-47bb-0310-9956-ffa450edef68
2014-05-23 21:12:16 +00:00
Jeff Trawick
d0edc26214 the fixup hook should log (what is expected to be) local
path just like the translate name hook, for a small hint
when debugging 400 errors set just below


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1596963 13f79535-47bb-0310-9956-ffa450edef68
2014-05-22 20:29:29 +00:00
Christophe Jaillet
2d01df12ea Fix duplicate APLOGNO
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1596108 13f79535-47bb-0310-9956-ffa450edef68
2014-05-20 04:02:49 +00:00
Jeff Trawick
048df00d71 Follow-up to r1588987:
Fix doc and code confusion about the trust/distrust flag; 1 is
distrust, 0 or NULL/- is trust.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1595861 13f79535-47bb-0310-9956-ffa450edef68
2014-05-19 12:24:06 +00:00
Rainer Jung
acd15709aa mod_socache_shmcb: Correct counting of expirations for status display.
Expirations happening during retrieval were not counted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1595426 13f79535-47bb-0310-9956-ffa450edef68
2014-05-17 06:01:35 +00:00
Ruediger Pluem
f17e7e5e10 * Correctly escape user provided data.
PR: 56532
Submitted by: Maksymilian <max cert.cx>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1595305 13f79535-47bb-0310-9956-ffa450edef68
2014-05-16 18:54:19 +00:00
Yann Ylavic
be383e6c93 mod_cache: follow up to r1594643.
Avoid table lookup if not necessary (fast path first).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594648 13f79535-47bb-0310-9956-ffa450edef68
2014-05-14 17:34:05 +00:00
Yann Ylavic
baf4f92af0 mod_cache: follow up to r1591328.
Define the cache_merge_headers_out() function to merge r->err_headers_out into
r->headers_out and add the ones from r->content_type/encoding if available.
Use it in ap_cache_cacheable_headers_out() where the same is done and in
cache_save_filter() where this has to be done before updating the entry.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594643 13f79535-47bb-0310-9956-ffa450edef68
2014-05-14 17:11:49 +00:00
Yann Ylavic
f063241b1f mod_proxy_wstunnel: Fix the use of SSL connections with the "wss:" scheme.
PR55320.

Submitted by: Alex Liu <alex.leo.ca gmail.com>
Committed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594625 13f79535-47bb-0310-9956-ffa450edef68
2014-05-14 15:54:38 +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
Eric Covener
8b7d9aa142 stop setting context info for AliasMatch. These concepts do not really map
well/reliably to AliasMatch.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593745 13f79535-47bb-0310-9956-ffa450edef68
2014-05-10 23:43:48 +00:00
Ben Reser
fb5675a5b8 mod_dav: Fix invalid Location header when a resource is created by passing an
absolute URI on the request line.

Using r->unparsed_uri is wrong since it might contain a scheme, hostname and
port.  See section 5.1.2 of RFC 2616, an absolute URI is allowed.  The
unparsed_uri field is absolutely unparsed.  The current code causes the
Location header to end up having the scheme, host and port included twice.

* modules/dav/main/mod_dav.c
  (dav_created): Call ap_escape_uri() on r->uri when caller doesn't provide a
    location.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592655 13f79535-47bb-0310-9956-ffa450edef68
2014-05-06 05:00:21 +00:00
Jeff Trawick
094e7489e3 fix Doxygen markup error
Submitted by: jailletc36


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592632 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 21:13:12 +00:00
Jeff Trawick
65341f92bc Follow-up to r1592529:
Define default port for "scgi" schemes (as chosen by
mod_proxy_scgi) in a common location.

Suggested by: jailletc36


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592615 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 19:26:33 +00:00
Jeff Trawick
dafc97aa81 mod_proxy_scgi: Support Unix sockets.
ap_proxy_port_of_scheme(): Support default SCGI port (4000).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592529 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 14:02:48 +00:00
Jeff Trawick
a306773aa4 Clarify an existing requirement of the server_portstr parameter
to ap_proxy_determine_connection(): it must be a buffer of at
least one byte in size.

(And don't bother with using strcpy in order to zap a string.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592514 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 12:47:18 +00:00
Jeff Trawick
19b5b85316 reformat only (get rid of unnecessary block scope)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592511 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 12:40:47 +00:00
Jeff Trawick
a8b72c1517 mod_proxy_fcgi: Fix occasional high CPU when handling request bodies.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592037 13f79535-47bb-0310-9956-ffa450edef68
2014-05-02 20:46:28 +00:00
Jeff Trawick
31dab168f5 better diagnostics for failures during dispatch()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592032 13f79535-47bb-0310-9956-ffa450edef68
2014-05-02 20:33:57 +00:00
Jim Jagielski
6943aaae8f Now in https://svn.apache.org/repos/asf/httpd/mod_spdy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591623 13f79535-47bb-0310-9956-ffa450edef68
2014-05-01 11:44:08 +00:00
Jeff Trawick
5dac70c7aa mod_proxy_fcgi: Support iobuffersize parameter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591508 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 22:52:41 +00:00
Jeff Trawick
cc065dba44 Axe unnecessary memset() calls and allocating an extra
byte in an I/O buffer for '\0', which hasn't been needed
since a strstr("\r\n\r\n") was removed in r371428.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591472 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 20:21:03 +00:00
Yann Ylavic
54f9353df0 mod_ssl: follow up to r1583191.
Use type BOOL for modssl_ctx_t's field ocsp_use_request_nonce.
Suggested by: kbrand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591401 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 17:15:07 +00:00
Yann Ylavic
308f0615fd mod_cache: follow up to r1591390
Fix code typo.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591394 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 16:53:00 +00:00
Yann Ylavic
f33d682667 mod_cache: follow up to r1591322
Avoid one unnecessary test when checking 304 contradictions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591390 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 16:34:15 +00:00
Yann Ylavic
4d2d2c5edc mod_cache: Preserve non-cacheable headers forwarded from an origin 304
response. PR 55547.

When mod_cache asks for a revalidation of a stale entry and the origin responds
with a 304 (not that stale), the module strips the non-cacheable headers from
the origin response and merges the stale headers to update the cache.

The problem is that mod_cache won't forward the non-cacheable headers to the
client, for example if the 304 response contains both Set-Cookie and
'Cache-Control: no-cache="Set-Cookie"' headers, or CacheIgnoreHeaders is used.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591328 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:58:33 +00:00
Yann Ylavic
0e28401e45 mod_cache: follow up to r1591320.
Use the new MOD_CACHE_ENTITY_HEADERS[] names to check 304 contradictions
against the same headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591322 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:53:35 +00:00
Yann Ylavic
75e24df9a8 mod_cache: Don't add cached/revalidated entity headers to a 304 response.
PR 55547.

When the conditional request meets the conditions of the stale then revalidated
entry, the forwarded 304 response includes the entity headers merged from the
cached headers (before updating the entry).
Strip them before returning a 304.

Since the entity headers are stripped elsewhere, factorize the code using a
new table (MOD_CACHE_ENTITY_HEADERS[]) containing these headers's names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591320 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:43:27 +00:00
Yann Ylavic
241c1c3d0e Revert r1591312 (again) to commit the 2 fixes separately.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591316 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:33:21 +00:00
Yann Ylavic
676b474db1 mod_cache: Don't add cached/revalidated entity headers to a 304 response.
PR 55547.

When the conditional request meets the conditions of the stale then revalidated
entry, the forwarded 304 response includes the entity headers merged from the
cached headers (before updating the entry).
Strip them before returning a 304.

Since the entity headers are stripped elsewhere, factorize the code using a
new table (MOD_CACHE_ENTITY_HEADERS[]) containing these headers's names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591312 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:25:45 +00:00
Yann Ylavic
6eaa07d635 Rollback r1591302, wrong file commited.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591307 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:21:05 +00:00
Yann Ylavic
f3ec657e4f mod_cache: Don't add cached/revalidated entity headers to a 304 response.
PR 55547.

When the conditional request meets the conditions of the stale then revalidated
entry, the forwarded 304 response includes the entity headers merged from the
cached headers (before updating the entry).
Strip them before returning a 304.

Since the entity headers are stripped elsewhere, factorize the code using a
new table (MOD_CACHE_ENTITY_HEADERS[]) containing these headers's names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591302 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 14:14:53 +00:00
Yann Ylavic
e14c0e4755 mod_cache: Retry unconditional request with the full URL (including the
query-string) when the origin server's 304 response does not
           match the conditions used to revalidate the stale entry.

http://www.mail-archive.com/dev@httpd.apache.org/msg59884.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591143 13f79535-47bb-0310-9956-ffa450edef68
2014-04-29 23:28:11 +00:00
Graham Leggett
9376a82bb2 mod_authnz_ldap: Fail explicitly when the filter is too long. Remove
unnecessary apr_pstrdup() and strlen().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591012 13f79535-47bb-0310-9956-ffa450edef68
2014-04-29 16:05:56 +00:00
Jim Jagielski
e7b2b05602 Fold in mod_spdy source
NOTE: THIS IS THE INITIAL LOAD OF THE SRC AS-IS AND AS DONATED



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1590597 13f79535-47bb-0310-9956-ffa450edef68
2014-04-28 10:55:17 +00:00
Yann Ylavic
f96bc81bc4 mod_deflate: follow up to r1587639.
Don't break the looped brigade when moving the FLUSH bucket to the returned bb
and continue reading.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1590509 13f79535-47bb-0310-9956-ffa450edef68
2014-04-27 22:39:32 +00:00
Jeff Trawick
eb9b6affd5 mod_proxy_fcgi: Don't segfault when failing to connect to the backend.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1590437 13f79535-47bb-0310-9956-ffa450edef68
2014-04-27 18:10:03 +00:00
Graham Leggett
84358db95c Add the ldap-search option to mod_authnz_ldap, allowing authorization
to be based on arbitrary expressions that do not include the username.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589993 13f79535-47bb-0310-9956-ffa450edef68
2014-04-25 11:14:36 +00:00
Jeff Trawick
a5d79394e3 Follow-up to r1587607:
Export new mod_ssl APIs when using traditional Windows build mechanism


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589699 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 12:51:48 +00:00
Jeff Trawick
4921c237ba allow operation without any logs configured or without the
log client tool configured

this supports configurations where SCTs are managed by the admin or
by some other infrastructure


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589398 13f79535-47bb-0310-9956-ffa450edef68
2014-04-23 12:45:45 +00:00
Jeff Trawick
d4515e5187 ensure that the post-config hook runs after that of mod_ssl
(mod_ssl_ct looks for stuff that should have been found
while mod_ssl ran)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589389 13f79535-47bb-0310-9956-ffa450edef68
2014-04-23 12:38:03 +00:00
Jeff Trawick
06189fe5af back to c89
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588989 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 21:31:42 +00:00
Jeff Trawick
c51e4d9cbc Add module mod_ssl_ct, which provides an implementation of Certificate
Transparency (RFC 6962) for httpd.

mod_ssl_ct requires OpenSSL 1.0.2 (in beta) and must be explicitly
enabled via configure.

Note that support/ctauditscts is purposefully not installed; it
does not properly function due to a dependency on a 
certificate-transparency open source project tool which itself is
not sufficiently complete at this time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588987 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 21:14:21 +00:00
Jeff Trawick
4af211f0ef Initialize post_handshake_rc for case where a failure has
already occurred (doesn't change execution but avoids warning
with some levels of gcc).

Pointed out by: kbrand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588868 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 11:03:26 +00:00
Christophe Jaillet
4ed59c4673 Typo in comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588862 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 09:33:41 +00:00
Kaspar Brand
afe9fee88c ssl_stapling_init_cert: do not return success when no responder URI is found
stapling_renew_response: abort early (before apr_uri_parse) if ocspuri is empty


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588853 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 06:54:41 +00:00
Kaspar Brand
eced8a0d15 ssl_callback_TmpDH: for OpenSSL 1.0.2 and later, set the current cert to the
one actually used for the connection before calling SSL_get_privatekey(ssl)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588851 13f79535-47bb-0310-9956-ffa450edef68
2014-04-21 06:39:24 +00:00