From 7336a8ee3e398d7c7981d1ee247a837f48684446 Mon Sep 17 00:00:00 2001 From: default Date: Sat, 10 Dec 2022 14:49:26 +0100 Subject: [PATCH] Updated RELEASE_NOTES. --- RELEASE_NOTES.md | 4 ++++ xs_httpd.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f942610..210d3cc 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,9 @@ # Release Notes +## 2.15 + +Fixed bug in message posting that may result in 400 Bad Request errors (contributed by tobyjaffey). + ## 2.14 Previous posts in the public and private timelines can be reached by a "More..." post at the end (contributed by kensanata). diff --git a/xs_httpd.h b/xs_httpd.h index 09dce0d..89ab57a 100644 --- a/xs_httpd.h +++ b/xs_httpd.h @@ -74,7 +74,6 @@ void *memmem(const void *, size_t, const void *, size_t); d_char *_xs_multipart_form_data(char *payload, int p_size, char *header) /* parses a multipart/form-data payload */ { - d_char *p_vars = xs_dict_new(); xs *boundary = NULL; int offset = 0; int bsz; @@ -92,6 +91,8 @@ d_char *_xs_multipart_form_data(char *payload, int p_size, char *header) bsz = strlen(boundary); + d_char *p_vars = xs_dict_new(); + /* iterate searching the boundaries */ while ((p = memmem(payload + offset, p_size - offset, boundary, bsz)) != NULL) { xs *s1 = NULL;