Commit 0a45933d authored by Jean-Frederic Clere's avatar Jean-Frederic Clere
Browse files

Add the improvement proposed by rpluem to my backporting proposal.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@536158 13f79535-47bb-0310-9956-ffa450edef68
parent e2fd721f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -101,9 +101,10 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
PATCHES PROPOSED TO BACKPORT FROM TRUNK:

    * mod_proxy_ajp: Fix wrong retry when sending the response failed.
      PR 40310 (The old fix wasn't ok).
      PR 40310 (The old fixes weren't ok).
      Trunk version of patch:
      http://svn.apache.org/viewvc?view=rev&revision=518938
      http://svn.apache.org/viewvc?view=rev&revision=534031
      (It also works for httpd-2.2.x).
      +1: jfclere
      rpluem says: If you add
+6 −3
Original line number Diff line number Diff line
@@ -271,6 +271,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                            ap_log_error(APLOG_MARK, APLOG_DEBUG, status,
                                         r->server,
                                         "ap_get_brigade failed");
                            isok = 0;
                            break;
                        }
                        bufsiz = AJP13_MAX_SEND_BODY_SZ;
@@ -281,6 +282,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                            ap_log_error(APLOG_MARK, APLOG_DEBUG, status,
                                         r->server,
                                         "apr_brigade_flatten failed");
                            isok = 0;
                            break;
                        }
                    }
@@ -291,6 +293,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                    if (status != APR_SUCCESS) {
                        ap_log_error(APLOG_MARK, APLOG_DEBUG, status, r->server,
                                     "ajp_send_data_msg failed");
                        isok = 0;
                        break;
                    }
                    conn->worker->s->transferred += bufsiz;
@@ -358,7 +361,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                if (ap_pass_brigade(r->output_filters,
                                    output_brigade) != APR_SUCCESS) {
                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                                  "proxy: error processing body");
                                  "proxy: error processing end");
                    isok = 0;
                }
                /* XXX: what about flush here? See mod_jk */
@@ -406,11 +409,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
     */
    apr_brigade_cleanup(output_brigade);

    if (status != APR_SUCCESS) {
    if (! isok) {
        /* We had a failure: Close connection to backend */
        conn->close++;
        ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
                     "proxy: send body failed to %pI (%s)",
                     "proxy: dialog to %pI (%s) failed",
                     conn->worker->cp->addr,
                     conn->worker->hostname);
        /*