summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jacek Roszkowski2020-12-07 01:59:19 +0100
committerGravatar Nikias Bassen2021-11-14 01:06:12 +0100
commit8b692d697f4be5cd90b8a7c00505938d3dae2dcd (patch)
treed526fb1439c85fe6907c0eddfb9e99209fb6347d
parent89bd4655d0739c33854e35ca903201f44eeee373 (diff)
downloadlibideviceactivation-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
-rw-r--r--src/activation.c8
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;
}
}