diff options
author | Jacek Roszkowski | 2020-12-07 01:59:19 +0100 |
---|---|---|
committer | Nikias Bassen | 2021-11-14 01:06:12 +0100 |
commit | 8b692d697f4be5cd90b8a7c00505938d3dae2dcd (patch) | |
tree | d526fb1439c85fe6907c0eddfb9e99209fb6347d /src | |
parent | 89bd4655d0739c33854e35ca903201f44eeee373 (diff) | |
download | libideviceactivation-8b692d697f4be5cd90b8a7c00505938d3dae2dcd.tar.gz libideviceactivation-8b692d697f4be5cd90b8a7c00505938d3dae2dcd.tar.bz2 |
The type, subtype, and parameter name tokens of Content-Type header are case-insensitive.
https://tools.ietf.org/html/rfc7231#section-3.1.1.1
Diffstat (limited to 'src')
-rw-r--r-- | src/activation.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/activation.c b/src/activation.c index 9e7115a..d66f7ee 100644 --- a/src/activation.c +++ b/src/activation.c @@ -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; } } |