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

1707 Commits

Author SHA1 Message Date
Yann Ylavic
aa5ca9770e mod_proxy_fcgi: follow up to r1592032.
Also break the outer loop when "sending stdin" fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1603122 13f79535-47bb-0310-9956-ffa450edef68
2014-06-17 10:37:15 +00:00
Jeff Trawick
e22212a41b Reindent after small fix in r1603027
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1603029 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 23:57:19 +00:00
Jeff Trawick
d6d845cfcd Fix bug introduced in r1591508 which resulted in the final empty
FCGI_STDIN not being sent.  Interaction with latest uWSGI (and
probably other protocol implementations) breaks without this.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1603027 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 23:56:06 +00:00
Yann Ylavic
ec95d72c5a mod_proxy: Don't limit the size of the connectable Unix Domain Socket paths.
Since connect() to UDS path is used at several places, introduce
ap_proxy_connect_uds() in proxy_util.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602989 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 20:26:24 +00:00
Jim Jagielski
637f263141 revert 1602523, until there is understanding
about what the actual issue and "requirement" are.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602697 13f79535-47bb-0310-9956-ffa450edef68
2014-06-15 13:54:55 +00:00
Jim Jagielski
74820dfc57 Allow for "magic" scheme "auto" which makes the scheme of
the backend worker match whatever the scheme of the
incoming request was...

For example:

   ProxyPass / auto://foo.example.com/

If the incoming request is http:.../lala then
the resultant will be http://foo.example.com/lala

If it's wws:.../lolo then we'd send
wws://foo.example.com/lolo

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602523 13f79535-47bb-0310-9956-ffa450edef68
2014-06-13 21:10:51 +00:00
Takashi Sato
0e4cf76a64 Socket event callback now takes pollfd.
User (e.g. mod_proxy_wstunnel) can know
which socket is ready.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601943 13f79535-47bb-0310-9956-ffa450edef68
2014-06-11 16:39:34 +00:00
Yann Ylavic
3dd42c024f mod_proxy: follow up to r1601291.
Since deferred_write_pool is needed by the core_output_filter and is a subpool
of the connection, shutdown in a pre_cleanup of the connection's pool to avoid
a freed memory access (SEGV).

Reported By: takashi


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601630 13f79535-47bb-0310-9956-ffa450edef68
2014-06-10 13:23:20 +00:00
Yann Ylavic
9614c0b8e6 Strip useless apr_brigade_cleanup() calls.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601624 13f79535-47bb-0310-9956-ffa450edef68
2014-06-10 12:44:15 +00:00
Takashi Sato
854c7a5611 * apr_status_t vs HTTP status code fix
* use APR_STATUS_IS_ENOTIMPL rather than direct comparison


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601604 13f79535-47bb-0310-9956-ffa450edef68
2014-06-10 11:21:22 +00:00
Takashi Sato
a310a093ba Private function doesn't need ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601603 13f79535-47bb-0310-9956-ffa450edef68
2014-06-10 11:08:43 +00:00
Yann Ylavic
5cc5869ea4 mod_proxy: Shutdown (eg. SSL close notify) the backend connection
before closing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601291 13f79535-47bb-0310-9956-ffa450edef68
2014-06-09 01:03:39 +00:00
Yann Ylavic
bac2d32f4c Revert r1601285 and r1601283.
Shouldn't have commited the latter without disussing it on dev@.
Since the former creates upper APLOGNOs, revert and then recommit with the reverted next tag number.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601290 13f79535-47bb-0310-9956-ffa450edef68
2014-06-09 00:59:04 +00:00
Yann Ylavic
9f43505e4d mod_proxy: Shutdown (eg. close notify) the backend connection before closing.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601285 13f79535-47bb-0310-9956-ffa450edef68
2014-06-09 00:23:16 +00:00
Yann Ylavic
f1a9de3123 mod_proxy_http: avoid (unlikely) access to freed memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599486 13f79535-47bb-0310-9956-ffa450edef68
2014-06-03 11:47:11 +00:00
Christophe Jaillet
68b56009d5 Fix computation of the size of 'struct sockaddr_un' when passed to 'connect()'.
Use the same logic as the one in ' in 'proxy_util.c'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1598946 13f79535-47bb-0310-9956-ffa450edef68
2014-06-01 06:54:15 +00:00
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
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
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
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
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
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
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
Jim Jagielski
2aa898bb2f strncmp(r->filename, "proxy:", 6) is faster than a
note. Plus, allows for checking even if not due to
rewrite.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588544 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 19:21:35 +00:00
Yann Ylavic
9ba346e885 mod_proxy: Preserve original request headers even if they differ
from the ones to be forwarded to the backend. PR 45387.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588527 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 17:38:15 +00:00
Yann Ylavic
987c973aaa mod_proxy: When ping/pong is configured for a worker, don't send or forward
"100 Continue" (interim) response to the client if it does not
           expect one.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588519 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 17:17:06 +00:00
Eric Covener
2cba644ed3 whitespace changes only
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587657 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 17:56:32 +00:00
Eric Covener
7fd249108f followup to r1587036.
if backend->close is set too early, proxy_util.c will close it right 
away and then blow away the field.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587654 13f79535-47bb-0310-9956-ffa450edef68
2014-04-15 17:56:00 +00:00
Eric Covener
88bcccd4a9 s/asynch/async
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587126 13f79535-47bb-0310-9956-ffa450edef68
2014-04-14 00:13:43 +00:00
Eric Covener
4becd93579 several related mod_proxy_wstunnel changes that are tough to pull apart:
* make async websockets tunnel opt-in
* add config for how long we block a thread in asynch mode
* add config for a cap on the synchronous path
* avoid sending error responses down the upgraded tunnel



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587075 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 18:41:05 +00:00
Eric Covener
e255101079 stop leaking websockets backend connections (trunk only)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587057 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 17:26:30 +00:00
Eric Covener
4a3fe3bcf7 cleanup wstunnel error handling
Submitted By: covener, ylavic, Edward Lu
Commited By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587053 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 17:21:50 +00:00
Eric Covener
a8b534d41d actually remove mod_reqtimeout, since the util_filter functions involved
only manipulate c->input_filters no matter what we pass. We need to make
copies of c->input_filters after, not before, it skips over reqtimeout.

Note: reqtimeout doesn't really interfere today with normal operation,
but this is misleading/confusing when dealing with other
wstunnel issues.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587040 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 17:00:38 +00:00
Eric Covener
5ab33646af *) mod_proxy_wstunnel: Don't pool backend websockets connections,
because we need to handshake every time. PR 55890.
     [Eric Covener]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587036 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 16:57:34 +00:00
Jeff Trawick
5512fa1b86 mod_proxy_http: Add detach_backend hook.
The immediate use is for a SSL-related module which works
on the backend proxy connection to be able to "leak" information
into the client r for logging.

This could be useful with other proxy scheme handlers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1586719 13f79535-47bb-0310-9956-ffa450edef68
2014-04-11 17:07:18 +00:00
Jeff Trawick
7775249b30 mod_proxy_fcgi: Fix sending of response without some HTTP headers
that might be set by filters.

The problem occurs when no body bytes were read while reading the
response headers, resulting in an empty brigade being sent down
the filter stack.  One particualr filter that mishandles the empty
initial brigade is mod_deflate.  It neglects to add to the response
header fields.

PR: 55558
Submitted by: Jim Riggs <jim riggs.me>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585824 13f79535-47bb-0310-9956-ffa450edef68
2014-04-08 20:07:04 +00:00
Christophe Jaillet
e2643b38f9 Use 'apr_table_setn' instead of 'apr_table_set' when possible in order to save memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578760 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 06:52:08 +00:00
Christophe Jaillet
845a77beca Use 'apr_table_setn' instead of 'apr_table_set' when possible in order to save memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578759 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 06:51:49 +00:00
Jeff Trawick
d50ebf12a6 fix spelling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1575958 13f79535-47bb-0310-9956-ffa450edef68
2014-03-10 14:57:14 +00:00
Jim Jagielski
cd304f4964 Allow reverse-proxy to be set via explicit handler
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1573626 13f79535-47bb-0310-9956-ffa450edef68
2014-03-03 17:28:17 +00:00
Yann Ylavic
1e9f5c99cf mod_proxy: Add comment and avoid ternary operator as condition (no functional change).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1573229 13f79535-47bb-0310-9956-ffa450edef68
2014-03-01 21:36:27 +00:00
Yann Ylavic
d29ce4b047 mod_proxy: follows up r1572630.
Don't reuse a SSL backend connection with no SNI for a request requiring SNI.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572967 13f79535-47bb-0310-9956-ffa450edef68
2014-02-28 14:46:50 +00:00
Yann Ylavic
fb3ff3e754 Redo what was reverted in r1572627.
Don't reuse a SSL backend connection whose SNI differs. PR 55782.
This may happen when ProxyPreserveHost is on and the proxy-worker
handles connections to different Hosts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572630 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 15:40:01 +00:00