Skip to content

Commit

Permalink
httpd: Make sure httpd can recognize Content-Type headers with params.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stas Kobzar committed May 19, 2015
1 parent 1d9b3e9 commit bc8e865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/httpd/httpd_proc.c
Expand Up @@ -313,9 +313,9 @@ int getConnectionHeader(void *cls, enum MHD_ValueKind kind,
}
if (strcasecmp("Content-Type", key) == 0) {
LM_DBG("Content-Type=%s\n", value);
if (strcasecmp("text/xml", value) == 0)
if (strncasecmp("text/xml", value, 8) == 0)
pr->content_type = HTTPD_TEXT_XML_CNT_TYPE;
else if (strcasecmp("application/json", value) == 0)
else if (strncasecmp("application/json", value, 16) == 0)
pr->content_type = HTTPD_APPLICATION_JSON_CNT_TYPE;
else
pr->content_type = HTTPD_UNKNOWN_CNT_TYPE;
Expand Down

0 comments on commit bc8e865

Please sign in to comment.