diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-03 16:08:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-03 16:08:38 +0300 |
commit | 1ef4b90ce07ccc4e372f0b8179c69438bff24ae2 (patch) | |
tree | eb9cda4038333ff654e4da664325569d493c9648 /protocols/Tlen/src/tlen_avatar.cpp | |
parent | ceb375ad7f99c4169ffb3041037583996122fa57 (diff) |
mime type standardization
Diffstat (limited to 'protocols/Tlen/src/tlen_avatar.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_avatar.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index bd9c031b3a..3689a8bb75 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -274,22 +274,9 @@ static void TlenGetAvatarThread(void *ptr) if (resp != NULL) { if (resp->resultCode/100 == 2) { if (resp->dataLength > 0) { - int i; - for (i=0; i<resp->headersCount; i++ ) { + for (int i=0; i<resp->headersCount; i++ ) { if (!strcmpi(resp->headers[i].szName, "Content-Type")) { - if (!strcmpi(resp->headers[i].szValue, "image/png")) - format = PA_FORMAT_PNG; - else if (!strcmpi(resp->headers[i].szValue, "image/x-png")) - format = PA_FORMAT_PNG; - else if (!strcmpi(resp->headers[i].szValue, "image/jpeg")) - format = PA_FORMAT_JPEG; - else if (!strcmpi(resp->headers[i].szValue, "image/jpg")) - format = PA_FORMAT_JPEG; - else if (!strcmpi(resp->headers[i].szValue, "image/gif")) - format = PA_FORMAT_GIF; - else if (!strcmpi(resp->headers[i].szValue, "image/bmp")) - format = PA_FORMAT_BMP; - + format = ProtoGetAvatarFormatByMimeType(_A2T(resp->headers[i].szValue)); break; } } |