Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 5fc5044

Browse files
committed
Merge pull request #765 from HowJMay/content-type
fix: Allow spaces in Content-Type
2 parents 294b978 + 784f40f commit 5fc5044

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
DOXYFILE_ENCODING = UTF-8
22
PROJECT_NAME = "tangle-accelerator"
3-
PROJECT_NUMBER = 0.9.5
3+
PROJECT_NUMBER = 0.9.6
44
OUTPUT_DIRECTORY = docs/
55
OPTIMIZE_OUTPUT_FOR_C = YES
66
INPUT = . \

accelerator/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern "C" {
3737

3838
/** @name tangle-accelerator configures */
3939
/** @{ */
40-
#define TA_VERSION "tangle-accelerator/0.9.5"
40+
#define TA_VERSION "tangle-accelerator/0.9.6"
4141
#define TA_HOST "localhost"
4242
#define TA_PORT 8000
4343
#define SEED \

connectivity/http/http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static int ta_http_header_iter(void *cls, enum MHD_ValueKind kind, const char *k
289289
ta_http_request_t *header = cls;
290290

291291
if (0 == strncasecmp(MHD_HTTP_HEADER_CONTENT_TYPE, key, strlen(MHD_HTTP_HEADER_CONTENT_TYPE))) {
292-
if (api_path_matcher(value, "application/json(;?\\s*charset=(UTF|utf)-8)?") == SC_OK) {
292+
if (api_path_matcher(value, "application/json\\s*(;?\\s*charset\\s*=\\s*(UTF|utf)-8)?") == SC_OK) {
293293
header->valid_content_type = true;
294294
} else {
295295
header->valid_content_type = false;

0 commit comments

Comments
 (0)