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

Commit

Permalink
Merge pull request #765 from HowJMay/content-type
Browse files Browse the repository at this point in the history
fix: Allow spaces in Content-Type
  • Loading branch information
howjmay committed Sep 9, 2020
2 parents 294b978 + 784f40f commit 5fc5044
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "tangle-accelerator"
PROJECT_NUMBER = 0.9.5
PROJECT_NUMBER = 0.9.6
OUTPUT_DIRECTORY = docs/
OPTIMIZE_OUTPUT_FOR_C = YES
INPUT = . \
Expand Down
2 changes: 1 addition & 1 deletion accelerator/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern "C" {

/** @name tangle-accelerator configures */
/** @{ */
#define TA_VERSION "tangle-accelerator/0.9.5"
#define TA_VERSION "tangle-accelerator/0.9.6"
#define TA_HOST "localhost"
#define TA_PORT 8000
#define SEED \
Expand Down
2 changes: 1 addition & 1 deletion connectivity/http/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static int ta_http_header_iter(void *cls, enum MHD_ValueKind kind, const char *k
ta_http_request_t *header = cls;

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

0 comments on commit 5fc5044

Please # to comment.