mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
[BUG] http: redirects were broken by chunk changes
Redirects used to initialize a chunk whose size was not set (0). Also, the return code of chunk_strcpy() is 1 in case of success.
This commit is contained in:
parent
face839296
commit
3bb9c23bd6
@ -2702,7 +2702,7 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
|
|||||||
ret = !ret;
|
ret = !ret;
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
struct chunk rdr = { trash, 0 };
|
struct chunk rdr = { .str = trash, .size = sizeof(trash), .len = 0 };
|
||||||
const char *msg_fmt;
|
const char *msg_fmt;
|
||||||
|
|
||||||
/* build redirect message */
|
/* build redirect message */
|
||||||
@ -2719,7 +2719,7 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(chunk_strcpy(&rdr, msg_fmt)))
|
if (unlikely(!chunk_strcpy(&rdr, msg_fmt)))
|
||||||
goto return_bad_req;
|
goto return_bad_req;
|
||||||
|
|
||||||
switch(rule->type) {
|
switch(rule->type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user