]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] http_process_res_common() must not skip the forward analyser
authorWilly Tarreau <w@1wt.eu>
Mon, 4 Jan 2010 21:57:43 +0000 (22:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Jan 2010 21:57:43 +0000 (22:57 +0100)
By default this function returned 0 indicating an end of analysis.
This was not a problem as long as it was the last analyser in the
chain but becomes quite a big one now since it skips the forwarder
with auto_close enabled, causing some data to pass under the nose
of the last one undetected.

src/proto_http.c

index 03e730a2f400bf4138cb1a510e417a686ee51a0f..c68d49d729483e5332e2f714d76db7897c1f7310 100644 (file)
@@ -4267,10 +4267,9 @@ skip_content_length:
 }
 
 /* This function performs all the processing enabled for the current response.
- * It normally returns zero, but may return 1 if it absolutely needs to be
- * called again after other functions. It relies on buffers flags, and updates
- * t->rep->analysers. It might make sense to explode it into several other
- * functions. It works like process_request (see indications above).
+ * It normally returns 1 unless it wants to break. It relies on buffers flags,
+ * and updates t->rep->analysers. It might make sense to explode it into several
+ * other functions. It works like process_request (see indications above).
  */
 int http_process_res_common(struct session *t, struct buffer *rep, int an_bit, struct proxy *px)
 {
@@ -4644,9 +4643,9 @@ int http_process_res_common(struct session *t, struct buffer *rep, int an_bit, s
                 * otherwise we would not let the client side wake up.
                 */
 
-               return 0;
+               return 1;
        }
-       return 0;
+       return 1;
 }
 
 /* This function is an analyser which forwards response body (including chunk