mod_proxy_wstunnel.c

Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
mod_proxy_http: forward 100-continue, and minimize race conditions when

reusing backend connections. PR 60330.

+1: ylavic, icing, jim

ylavic: plus http://svn.apache.org/r1856036 (opt-out)

2.4.x patch: http://people.apache.org/~ylavic/patches/httpd-2.4.x-forward_100_continue-v6.patch

+1: ylavic, jim, minfrin

  1. … 10 more files in changeset.
Merge r1859371, r1859422 from trunk:

mod_proxy/ssl: Proxy SSL client certificate

configuration and other proxy SSL configurations

broken inside <Proxy> context.

PR 63430

Triggered by r1855646+r1855748.

Patch from rpluem (proxy) and ylavic (ssl).

Follow up to r1859371: extend to other ap_proxy_connection_create[_ex]() users.

This function now now handles SSL reuse as well as the "proxy-request-hostname"

note (SNI), so let's also call it unconditionnaly in all proxy modules.

On the mod_ssl side, since this note has the lifetime of the connection, don't

reset/unset it during handshake (ssl_io_filter_handshake).

Submitted by: rjung, ylavic

Reviewed by: rjung, rpluem, ylavic

  1. … 10 more files in changeset.
Merge r1851093 from trunk

* mod_proxy_wstunnel: Fix websocket proxy over UDS.

PR: 62932

Submitted by: <pavel dcmsys.com>

Reviewed by: jailletc36 (by inspection), jim, ylavic

Backported by: jailletc36

  1. … 1 more file in changeset.
  1. … 30 more files in changeset.
Merge r1801594 from trunk:

Add logic to read the Upgrade header and use it in the response.

Use we you are proxying to a server that has multiple upgrade on the same IP/Port.

PR 61142

Submitted by: jfclere

Reviewed by: jfclere, jim, covener

  1. … 6 more files in changeset.
Merge r1754164, r1801994, r1801995 from trunk:

mod_proxy_wstunnel: we want to detect whether some response was sent to

the client when forwarding data from the backend to the client, not the

reverse.

Follow up to r1754164: CHANGES entry.

Follow up to r1801994: CHANGES' PR reference.

Submitted by: ylavic

Reviewed by: ylavic, jchampion, jim

  1. … 5 more files in changeset.
Merge from trunk:

Add upgrade parameter to mod_proxy_wstunnel.

That allows to upgrade to jboss-remoting for example

or to run an HTTP/1.1 backend that needs to upgrade to

WebSocket.

See also:

https://issues.jboss.org/browse/JBCS-254

https://issues.jboss.org/browse/JBCS-291

whitespace only

Submitted By: jfclere

Reviewed By: covener, jim, ylavic

  1. … 8 more files in changeset.
mod_proxy_wstunnel, mod_proxy_connect: Use the correct pool and allocator

lifetime when sending brigades and buckets down the filter chain

  1. … 5 more files in changeset.
Merge r1681795, r1682988, r1682979, r1682819, r1682816 from trunk:

initialize args to not print garbage mem during a RewriteRule parse error

Initialize args to not print garbage mem during a RewriteCond parse error (same as r1681795 for RewriteRule)

Improve style in examples.

Improve error message (related to PR57311 diagnostic)

Concat string at compile time in order to save a few cycles.

Submitted by: covener, jailletc36, jailletc36, jailletc36, jailletc36

Reviewed/backported by: jim

  1. … 8 more files in changeset.
Merge r1674632 from trunk:

mod_proxy_wstunnel: Bypass the handler while the connection is not

upgraded to WebSocket, so that other modules can possibly take over

the leading HTTP requests.

Submitted by: ylavic

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Backport r1669299 from trunk:

*) mod_proxy_wstunnel: Avoid an empty response by failing with 502 (Bad

Gateway) when no response is ever received from the backend.

Submitted By: jkaluza

Reviewde By: covener, ylavic, trawick

  1. … 2 more files in changeset.
Merge r1657636, r1657638, r1669130 from trunk:

mod_proxy_connect/wstunnel: If both client and backend sides get readable

at the same time, don't lose errors occuring while forwarding on the first

side when none occurs next on the other side, and abort.

CHANGES: Follow up to r1657636, clarify message.

mod_proxy_{connect,wstunnel}: follow up to r1657636.

Since rv is not used as an apr_status_t in the loop (it's logging is done by

proxy_{connect,wstunnel}_transfer() when necessary/relevent), use a boolean

instead to avoid the ugly ORs between APR error codes.

Submitted by: ylavic

Reviewed/backported by: jim

  1. … 4 more files in changeset.
Merge r1635644 from trunk:

mod_proxy_wstunnel: abort backend connection on polling error to avoid

further processing (lingering close, SSL shutdown).

Submitted by: ylavic

Reviewed/backported by: jim

  1. … 4 more files in changeset.
Merge r1533765, r1621419, r1638159, r1638188, r1601603, r1638412, r1418763 from trunk

ssl: Axe needless string duplication in setup for call to apr_proc_create()

Fix sscanf format spotted by cppcheck

fix indent.

fix style

Private function doesn't need ap_ prefix.

tab vs space

rename variables: s should be the server_rec

Submitted by: trawick, jailletc36, jailletc36, jailletc36, takashi, jailletc36, sf

Reviewed by: jailletc36, ylavic, covener

Backported by: jailletc36

  1. … 8 more files in changeset.
Merge r1619297, r1621806 from trunk:

Missing va_end spotted by cppcheck

Silent some cppcheck warnings.

Submitted by: jailletc36

Reviewed/backported by: jim

  1. … 5 more files in changeset.
Merge r1597642, r1608999, r1605207, r1610366, r1610353, r1611871 from trunk:

Rename module name in doxygen + partly revert r832442 which skipped doxygen doc generation for 'mod_watchdog.h'

s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles

Use ap_remove_input_filter_byhandle instead of duplicating the code.

Remove some 'register' in variable declaration.

Remove some 'register' in variable declaration.

Save a few cycles by calling 'apr_isalnum' instead of 'apr_isalpha' and 'apr_isdigit'.

Do not use deprecated define.

No change in generated code because MODULE_MAGIC_NUMBER is defined as:

#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR

Submitted by: jailletc36

Reviewed/backported by: jim

  1. … 12 more files in changeset.
Merge r1594625 from trunk:

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

Submitted by: ylavic

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1587036, r1587040, r1587053, r1587654 from trunk:

*) mod_proxy_wstunnel: Don't pool backend websockets connections,

because we need to handshake every time. PR 55890.

[Eric Covener]

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.

cleanup wstunnel error handling

Submitted By: covener, ylavic, Edward Lu

Commited By: covener

followup to r1587036.

if backend->close is set too early, proxy_util.c will close it right

away and then blow away the field.

Submitted by: covener

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1569615 from trunk:

handle POLLERR/POLLHUP during poll() to avoid high CPU busy loop.

Submitted By: Joffroy Christen <joffroy.christen solvaxis com>, Eric Covener]

Committed By: covener

Submitted by: covener

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1452911, r1452949, r1452954, r1453022, r1453574, r1453875, r1453876, r1453963, r1454386, r1454414, r1454415, r1458285, r1458447 from trunk:

Rough start for simple, tunneling websocket proxy support.

Compiles at this stage and that's all I know :)

force correct scheme info

We need to ensure a conn_rec

Work around blocking issues...

And now pass the initial request to the backend...

I dislike this duplication of code from mod_proxy_http()

but maybe it's inevitable. I may create ap_proxy_create_headerb()

to create a header brigade that both modules can use.

Pull out duplicated code to proxy_util...

rename extension module... tunnel is more accurate

log nums

"final" rename :)

don't strip these, ensure that they exist.

streamline

bypass reqtimeout for websockets

Keep mod_req clear. Simply scan thru input filters and

remove it within the ws submodule. Nasty, but it keeps

mod_req untouched (for now ;) )

Reviewed/backported by: jim

  1. … 20 more files in changeset.