diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-01-14 16:31:42 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-15 08:33:27 +0100 |
commit | 1123a0eb243338d259dc21863b2f2c54e3427782 (patch) | |
tree | 1c3fcd226ea1110af13203578123c78a1a6d5e2e /lib | |
parent | b68dc34af341805aeb7b371541a2b4074da76217 (diff) | |
download | curl-1123a0eb243338d259dc21863b2f2c54e3427782.tar.gz |
mime: make sure setting MIMEPOST to NULL resets properly
... so that a function can first use MIMEPOST and then set it to NULL to
reset it back to a blank POST.
Added test 584 to verify the fix.
Reported-by: Christoph M. Becker
Fixes #6455
Closes #6456
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mime.c b/lib/mime.c index 2ddd9b8b9..abadcb02c 100644 --- a/lib/mime.c +++ b/lib/mime.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -1168,6 +1168,7 @@ static void cleanup_part_content(curl_mimepart *part) part->kind = MIMEKIND_NONE; part->flags &= ~MIME_FAST_READ; part->lastreadstatus = 1; /* Successful read status. */ + part->state.state = MIMESTATE_BEGIN; } static void mime_subparts_free(void *ptr) |