/* send request headers */
status = ajp_send_header(conn->sock, r, maxsize, uri);
if (status != APR_SUCCESS) {
- conn->close++;
+ conn->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00868)
"request failed to %pI (%s)",
conn->worker->cp->addr,
status = ajp_alloc_data_msg(r->pool, &buff, &bufsiz, &msg);
if (status != APR_SUCCESS) {
/* We had a failure: Close connection to backend */
- conn->close++;
+ conn->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00869)
"ajp_alloc_data_msg failed");
return HTTP_INTERNAL_SERVER_ERROR;
if (status != APR_SUCCESS) {
/* We had a failure: Close connection to backend */
- conn->close++;
+ conn->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00871)
"ap_get_brigade failed");
apr_brigade_destroy(input_brigade);
status = apr_brigade_flatten(input_brigade, buff, &bufsiz);
if (status != APR_SUCCESS) {
/* We had a failure: Close connection to backend */
- conn->close++;
+ conn->close = 1;
apr_brigade_destroy(input_brigade);
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00874)
"apr_brigade_flatten");
ajp_msg_log(r, msg, "First ajp_send_data_msg: ajp_ilink_send packet dump");
if (status != APR_SUCCESS) {
/* We had a failure: Close connection to backend */
- conn->close++;
+ conn->close = 1;
apr_brigade_destroy(input_brigade);
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00876)
"send failed to %pI (%s)",
* for later resusage by the next request again.
* Close it to clean things up.
*/
- conn->close++;
+ conn->close = 1;
return HTTP_BAD_REQUEST;
}
}
(ajp_msg_t **)&(conn->data));
if (status != APR_SUCCESS) {
/* We had a failure: Close connection to backend */
- conn->close++;
+ conn->close = 1;
apr_brigade_destroy(input_brigade);
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00878)
"read response failed from %pI (%s)",
* But: Close this connection to the backend.
*/
if (r->connection->aborted) {
- conn->close++;
+ conn->close = 1;
output_failed = 0;
result = CMD_AJP13_END_RESPONSE;
request_ended = 1;
"Processing of request failed backend: %i, "
"output: %i", backend_failed, output_failed);
/* We had a failure: Close connection to backend */
- conn->close++;
+ conn->close = 1;
/* Return DONE to avoid error messages being added to the stream */
if (data_sent) {
rv = DONE;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00891)
"Processing of request didn't terminate cleanly");
/* We had a failure: Close connection to backend */
- conn->close++;
+ conn->close = 1;
backend_failed = 1;
/* Return DONE to avoid error messages being added to the stream */
if (data_sent) {
}
else if (!conn_reuse) {
/* Our backend signalled connection close */
- conn->close++;
+ conn->close = 1;
}
else {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00892)
apr_brigade_destroy(output_brigade);
if (apr_table_get(r->subprocess_env, "proxy-nokeepalive")) {
- conn->close++;
+ conn->close = 1;
}
return rv;
* TCP connection gets closed and try it once again.
*/
if (status != APR_SUCCESS) {
- backend->close++;
+ backend->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00897)
"cping/cpong failed to %pI (%s)",
worker->cp->addr, worker->s->hostname);
}
buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.0" CRLF, NULL);
force10 = 1;
- p_conn->close++;
+ p_conn->close = 1;
} else {
buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.1" CRLF, NULL);
force10 = 0;
}
if (apr_table_get(r->subprocess_env, "proxy-nokeepalive")) {
origin->keepalive = AP_CONN_CLOSE;
- p_conn->close++;
+ p_conn->close = 1;
}
ap_xlate_proto_to_ascii(buf, strlen(buf));
e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
*/
if (!r->kept_body && r->main) {
/* XXX: Why DON'T sub-requests use keepalives? */
- p_conn->close++;
+ p_conn->close = 1;
if (old_cl_val) {
old_cl_val = NULL;
apr_table_unset(r->headers_in, "Content-Length");
apr_table_unset(r->headers_in, "Content-Length");
old_cl_val = NULL;
origin->keepalive = AP_CONN_CLOSE;
- p_conn->close++;
+ p_conn->close = 1;
}
/* Prefetch MAX_MEM_SPOOL bytes
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01106)
"bad HTTP/%d.%d header returned by %s (%s)",
major, minor, r->uri, r->method);
- backend->close += 1;
+ backend->close = 1;
/*
* ap_send_error relies on a headers_out to be present. we
* are in a bad position here.. so force everything we send out
"server %s:%d returned Transfer-Encoding"
" and Content-Length",
backend->hostname, backend->port);
- backend->close += 1;
+ backend->close = 1;
}
/*
*/
te = apr_table_get(r->headers_out, "Transfer-Encoding");
/* strip connection listed hop-by-hop headers from response */
- backend->close += ap_find_token(p,
- apr_table_get(r->headers_out, "Connection"), "close");
+ if (ap_find_token(p, apr_table_get(r->headers_out, "Connection"),
+ "close"))
+ backend->close = 1;
ap_proxy_clear_connection(p, r->headers_out);
if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
ap_set_content_type(r, apr_pstrdup(p, buf));
/* cancel keepalive if HTTP/1.0 or less */
if ((major < 1) || (minor < 1)) {
- backend->close += 1;
+ backend->close = 1;
origin->keepalive = AP_CONN_CLOSE;
}
} else {
backasswards = 1;
r->status = 200;
r->status_line = "200 OK";
- backend->close += 1;
+ backend->close = 1;
}
if (ap_is_HTTP_INFO(proxy_status)) {