]> granicus.if.org Git - apache/commitdiff
Make sure that we are not resending if we have received something from Tomcat.
authorJean-Frederic Clere <jfclere@apache.org>
Fri, 16 Mar 2007 11:26:33 +0000 (11:26 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Fri, 16 Mar 2007 11:26:33 +0000 (11:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@518938 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_ajp.c

index 4beae30b273ff967e9039b303d3ff6b1329a1557..e7c372e5002749d18fb508f7d3dc3da99ae08968 100644 (file)
@@ -283,6 +283,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 = maxsize;
@@ -293,6 +294,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;
                         }
                     }
@@ -303,6 +305,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;
@@ -370,7 +373,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 */
@@ -418,11 +421,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);
         /*