MCPcopy Create free account
hub / github.com/apache/httpd / ap_proxy_ssl_connection_cleanup

Function ap_proxy_ssl_connection_cleanup

modules/proxy/proxy_util.c:1698–1729  ·  view source on GitHub ↗

DEPRECATED */

Source from the content-addressed store, hash-verified

1696
1697/* DEPRECATED */
1698PROXY_DECLARE(apr_status_t) ap_proxy_ssl_connection_cleanup(proxy_conn_rec *conn,
1699 request_rec *r)
1700{
1701 apr_status_t rv;
1702
1703 /*
1704 * If we have an existing SSL connection it might be possible that the
1705 * server sent some SSL message we have not read so far (e.g. an SSL
1706 * shutdown message if the server closed the keepalive connection while
1707 * the connection was held unused in our pool).
1708 * So ensure that if present (=> APR_NONBLOCK_READ) it is read and
1709 * processed. We don't expect any data to be in the returned brigade.
1710 */
1711 if (conn->sock && conn->connection) {
1712 rv = ap_get_brigade(conn->connection->input_filters, conn->tmp_bb,
1713 AP_MODE_READBYTES, APR_NONBLOCK_READ,
1714 HUGE_STRING_LEN);
1715 if (!APR_BRIGADE_EMPTY(conn->tmp_bb)) {
1716 apr_off_t len;
1717
1718 rv = apr_brigade_length(conn->tmp_bb, 0, &len);
1719 ap_log_rerror(APLOG_MARK, APLOG_TRACE3, rv, r,
1720 "SSL cleanup brigade contained %"
1721 APR_OFF_T_FMT " bytes of data.", len);
1722 apr_brigade_cleanup(conn->tmp_bb);
1723 }
1724 if ((rv != APR_SUCCESS) && !APR_STATUS_IS_EAGAIN(rv)) {
1725 socket_cleanup(conn);
1726 }
1727 }
1728 return APR_SUCCESS;
1729}
1730
1731/* reslist constructor */
1732static apr_status_t connection_constructor(void **resource, void *params,

Callers 1

mod_proxy.hFile · 0.85

Calls 2

ap_get_brigadeFunction · 0.85
socket_cleanupFunction · 0.85

Tested by

no test coverage detected