Skip to content

Commit

Permalink
The type, subtype, and parameter name tokens of Content-Type header a…
Browse files Browse the repository at this point in the history
  • Loading branch information
jarosz authored and nikias committed Nov 14, 2021
1 parent 89bd465 commit 8b692d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/activation.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,13 +603,13 @@ static size_t idevice_activation_header_callback(void *data, size_t size, size_t
}
if (value) {
if (strncasecmp(header, "Content-Type", 12) == 0) {
if (strcmp(value, "text/xml") == 0) {
if (strncasecmp(value, "text/xml", 8) == 0) {
response->content_type = IDEVICE_ACTIVATION_CONTENT_TYPE_PLIST;
} else if (strcmp(value, "application/xml") == 0) {
} else if (strncasecmp(value, "application/xml", 15) == 0) {
response->content_type = IDEVICE_ACTIVATION_CONTENT_TYPE_PLIST;
} else if (strcmp(value, "application/x-buddyml") == 0) {
} else if (strncasecmp(value, "application/x-buddyml", 21) == 0) {
response->content_type = IDEVICE_ACTIVATION_CONTENT_TYPE_BUDDYML;
} else if (strcmp(value, "text/html") == 0) {
} else if (strncasecmp(value, "text/html", 9) == 0) {
response->content_type = IDEVICE_ACTIVATION_CONTENT_TYPE_HTML;
}
}
Expand Down

0 comments on commit 8b692d6

Please sign in to comment.