unsigned int inreslist:1; /* connection in apr_reslist? */
const char *uds_path; /* Unix domain socket path */
const char *ssl_hostname;/* Hostname (SNI) in use by SSL connection */
- apr_bucket_brigade *tmp_bb;
+ apr_bucket_brigade *tmp_bb;/* Temporary brigade created with the connection
+ * and its scpool/bucket_alloc (NULL before),
+ * must be left cleaned when used (locally).
+ */
} proxy_conn_rec;
typedef struct {
unsigned int fnv;
} proxy_hashes ;
-/* Runtime worker status informations. Shared in scoreboard */
+/* Runtime worker status information. Shared in scoreboard */
typedef struct {
char name[PROXY_WORKER_MAX_NAME_SIZE];
char scheme[PROXY_WORKER_MAX_SCHEME_SIZE]; /* scheme to use ajp|http|https */
/**
* pre request hook.
* It will return the most suitable worker at the moment
- * and coresponding balancer.
+ * and corresponding balancer.
* The url is rewritten from balancer://cluster/uri to scheme://host:port/uri
* and then the scheme_handler is called.
*
PROXY_DECLARE(int) ap_proxy_pre_http_request(conn_rec *c, request_rec *r);
/* DEPRECATED (will be replaced with ap_proxy_connect_backend */
PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **, const char *, apr_sockaddr_t *, const char *, proxy_server_conf *, request_rec *);
+/* DEPRECATED (will be replaced with ap_proxy_check_backend */
PROXY_DECLARE(apr_status_t) ap_proxy_ssl_connection_cleanup(proxy_conn_rec *conn,
request_rec *r);
PROXY_DECLARE(int) ap_proxy_ssl_enable(conn_rec *c);
* @param url url containing balancer name
* @param alias alias/fake-path to this balancer
* @param do_malloc true if shared struct should be malloced
- * @return error message or NULL if successfull
+ * @return error message or NULL if successful
*/
PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
proxy_balancer **balancer,
PROXY_DECLARE(int) ap_proxy_release_connection(const char *proxy_function,
proxy_conn_rec *conn,
server_rec *s);
+/**
+ * Check a connection to the backend
+ * @param proxy_function calling proxy scheme (http, ajp, ...)
+ * @param conn acquired connection
+ * @param s current server record
+ * @param expect_empty whether to check for empty (no data available) or not
+ * @return APR_SUCCESS or,
+ * APR_ENOTSOCK: not connected,
+ * APR_NOTFOUND: worker in error state (unusable),
+ * APR_ENOTEMPTY: expect_empty set but the connection has data,
+ * other: connection closed/aborted (remotely)
+ */
+PROXY_DECLARE(apr_status_t) ap_proxy_check_backend(const char *proxy_function,
+ proxy_conn_rec *conn,
+ server_rec *s,
+ int expect_empty);
+
/**
* Make a connection to the backend
* @param proxy_function calling proxy scheme (http, ajp, ...)