You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

  1. From cba3bd6e5ce9b0be83c701c3c7a103d01d5b516d Mon Sep 17 00:00:00 2001
  2. From: Thierry Fournier <thierry.fournier@ozon.io>
  3. Date: Wed, 1 Jun 2016 13:36:20 +0200
  4. Subject: [PATCH 4/4] BUG/MINOR: http: add-header: header name copied twice
  5. The header name is copied two time in the buffer. The first copy is a printf-like
  6. function writing the name and the http separators in the buffer, and the second
  7. form is a memcopy. This seems to be inherited from some changes. This patch
  8. removes the printf like, format.
  9. This patch must be backported in 1.6 and 1.5 versions
  10. (cherry picked from commit 53c1a9b7cb8f3fe79b5492218363b6c0ff608fc1)
  11. (cherry picked from commit d281d68d3aa010f7e1a635c92ab486f7f2c666b9)
  12. ---
  13. src/proto_http.c | 1 -
  14. 1 file changed, 1 deletion(-)
  15. diff --git a/src/proto_http.c b/src/proto_http.c
  16. index 0b13c5e..8801592 100644
  17. --- a/src/proto_http.c
  18. +++ b/src/proto_http.c
  19. @@ -3399,7 +3399,6 @@ http_req_get_intercept_rule(struct proxy *px, struct list *rules, struct session
  20. case HTTP_REQ_ACT_SET_HDR:
  21. case HTTP_REQ_ACT_ADD_HDR:
  22. - chunk_printf(&trash, "%s: ", rule->arg.hdr_add.name);
  23. memcpy(trash.str, rule->arg.hdr_add.name, rule->arg.hdr_add.name_len);
  24. trash.len = rule->arg.hdr_add.name_len;
  25. trash.str[trash.len++] = ':';
  26. --
  27. 2.7.3