Lines Matching defs:backend

29                                           proxy_conn_rec *backend);
957 * reusing the backend connection.
973 * If we plan to close the backend connection sent Connection: close
1167 "Headers received from backend:");
1323 proxy_conn_rec *backend = *backend_ptr;
1324 conn_rec *origin = backend->connection;
1342 apr_socket_timeout_get(backend->sock, &old_timeout);
1345 rc = apr_socket_timeout_set(backend->sock, worker->s->ping_timeout);
1357 backend->r = make_fake_req(origin, r);
1361 backend->r->proxyreq = PROXYREQ_RESPONSE;
1370 rc = ap_proxygetline(tmp_bb, buffer, sizeof(buffer), backend->r, 0, &len);
1373 rc = ap_proxygetline(tmp_bb, buffer, sizeof(buffer), backend->r, 0, &len);
1378 "server %s:%d", backend->hostname, backend->port);
1383 proxy_run_detach_backend(r, backend);
1403 " reading from backend server %s:%d failed."
1404 " Number of keepalives %i", backend->hostname,
1405 backend->port, c->keepalives);
1413 /* Mark the backend connection for closing */
1414 backend->close = 1;
1416 proxy_run_detach_backend(r, backend);
1422 " although reading from backend server %s:%d"
1424 backend->hostname, backend->port);
1426 proxy_run_detach_backend(r, backend);
1431 backend->worker->s->read += len;
1447 proxy_run_detach_backend(r, backend);
1478 "Status from backend: %d", proxy_status);
1490 ap_proxy_read_headers(r, backend->r, buffer, sizeof(buffer), origin,
1497 backend->close = 1;
1506 proxy_run_detach_backend(r, backend);
1531 * and shut down the backend server connection
1538 backend->hostname, backend->port);
1539 backend->close = 1;
1551 backend->close = 1;
1562 ap_proxy_pre_http_request(origin, backend->r);
1602 backend->close = 1;
1610 backend->close = 1;
1619 apr_socket_timeout_set(backend->sock, old_timeout);
1628 * OTOH, an interim response here may mean the backend
1713 apr_table_set(backend->r->headers_in, "Transfer-Encoding", tmp);
1716 apr_table_set(backend->r->headers_in, "Content-Length", tmp);
1719 apr_table_set(backend->r->headers_in, "Transfer-Encoding", te);
1721 ap_discard_request_body(backend->r);
1723 proxy_run_detach_backend(r, backend);
1738 backend->r->headers_in = apr_table_clone(backend->r->pool, r->headers_out);
1744 if (te && !apr_table_get(backend->r->headers_in, "Transfer-Encoding")) {
1745 apr_table_add(backend->r->headers_in, "Transfer-Encoding", te);
1776 rv = ap_get_brigade(backend->r->input_filters, bb,
1790 backend->close = 1;
1798 backend->close = 1;
1816 * our backend bailed on us. Given we're half way
1828 backend->close = 1;
1834 if (!apr_is_empty_table(backend->r->trailers_in)) {
1836 backend->r->trailers_in, NULL);
1837 apr_table_clear(backend->r->trailers_in);
1841 backend->worker->s->read += readbytes;
1863 * data that lives only as long as the backend connection.
1879 /* make sure we release the backend connection as soon
1880 * as we know we are done, so that the backend isn't
1884 proxy_run_detach_backend(r, backend);
1885 ap_proxy_release_connection(backend->worker->s->scheme,
1886 backend, r->server);
1887 /* Ensure that the backend is not reused */
1896 /* Only close backend if we haven't got all from the
1897 * backend. Furthermore if *backend_ptr is NULL it is no
1898 * longer safe to fiddle around with backend as it might
1902 backend->close = 1; /* this causes socket close below */
1918 /* make sure we release the backend connection as soon
1919 * as we know we are done, so that the backend isn't
1923 proxy_run_detach_backend(r, backend);
1924 ap_proxy_release_connection(backend->worker->s->scheme,
1925 backend, r->server);
1942 proxy_run_detach_backend(r, backend);
1963 proxy_conn_rec *backend)
1965 ap_proxy_release_connection(scheme, backend, r->server);
1990 proxy_conn_rec *backend = NULL;
2041 if ((status = ap_proxy_acquire_connection(proxy_function, &backend,
2046 backend->is_ssl = is_ssl;
2049 ap_proxy_ssl_connection_cleanup(backend, r);
2055 * with the client, do NOT reuse the connection to the backend, because
2062 backend->close = 1;
2070 if ((status = ap_proxy_determine_connection(p, r, conf, worker, backend,
2078 * spooled. By doing this before connecting or reusing the backend, we want
2081 * filter retain the data). This is a best effort to prevent the backend
2088 if ((status = ap_proxy_http_prefetch(p, r, backend, worker, conf, uri,
2095 /* We need to reset backend->close now, since ap_proxy_http_prefetch() set
2101 toclose = backend->close;
2102 backend->close = 0;
2112 backend, uri, &newurl, proxyname, proxyport,
2124 if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) {
2126 "HTTP: failed to make connection to backend: %s",
2127 backend->hostname);
2133 backconn = backend->connection;
2135 if ((status = ap_proxy_connection_create(proxy_function, backend,
2138 backconn = backend->connection;
2145 if (backend->ssl_hostname) {
2146 apr_table_setn(backend->connection->notes,
2148 backend->ssl_hostname);
2154 * backend's socket/connection is reused (ie. no Step Three).
2157 !ap_proxy_is_socket_connected(backend->sock)) {
2158 backend->close = 1;
2169 backend->close = 1;
2177 if ((status = ap_proxy_http_request(p, r, backend,
2181 proxy_run_detach_backend(r, backend);
2185 backend->close = 1;
2197 status = ap_proxy_http_process_response(p, r, &backend, worker,
2205 if (backend) {
2207 backend->close = 1;
2208 ap_proxy_http_cleanup(proxy_function, r, backend);