]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: Use out buffer instead of trash to display error snapshot
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 29 Nov 2018 21:53:30 +0000 (22:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 1 Dec 2018 16:20:36 +0000 (17:20 +0100)
the function http_show_error_snapshot() must not use the trash buffer to append
the HTTP error description. Instead, it must use the <out> buffer, its first
argument. Note that concretely, this function always succeeds because <out> is
always the trash buffer.

src/proto_http.c

index 7c658d92b27b37470de6ea6e2ae005fac05befbe..43c1fcd4562ffd65ddfcb4629ff170dc741b04b5 100644 (file)
@@ -7421,7 +7421,7 @@ int stats_check_uri(struct stream_interface *si, struct http_txn *txn, struct pr
  */
 void http_show_error_snapshot(struct buffer *out, const struct error_snapshot *es)
 {
-       chunk_appendf(&trash,
+       chunk_appendf(out,
                      "  stream #%d, stream flags 0x%08x, tx flags 0x%08x\n"
                      "  HTTP msg state %s(%d), msg flags 0x%08x\n"
                      "  HTTP chunk len %lld bytes, HTTP body len %lld bytes, channel flags 0x%08x :\n",