diff options
author | Aki <please@ignore.pl> | 2022-03-30 20:27:15 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-03-30 20:27:15 +0200 |
commit | fa8827a0d36a30cc3d36ff68a8619a9081893f49 (patch) | |
tree | 6be78d1332e477e069f323f6b4199e85e964babe /NetEx | |
parent | 1c246db206481fc253ccc3488153fc5fbe6de285 (diff) | |
download | starshatter-fa8827a0d36a30cc3d36ff68a8619a9081893f49.zip starshatter-fa8827a0d36a30cc3d36ff68a8619a9081893f49.tar.gz starshatter-fa8827a0d36a30cc3d36ff68a8619a9081893f49.tar.bz2 |
Changed to use posix alternative for _stricmp
Diffstat (limited to 'NetEx')
-rw-r--r-- | NetEx/HttpRequest.cpp | 7 | ||||
-rw-r--r-- | NetEx/HttpResponse.cpp | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/NetEx/HttpRequest.cpp b/NetEx/HttpRequest.cpp index ff24296..12f6b1b 100644 --- a/NetEx/HttpRequest.cpp +++ b/NetEx/HttpRequest.cpp @@ -9,6 +9,9 @@ #include <ctype.h> #include <stdlib.h> #include <string.h> +#ifndef _WIN32 +#include <strings.h> +#endif #include "HttpParam.h" #include "List.h" @@ -146,7 +149,11 @@ HttpRequest::ParseRequest(Text request) value_buf[i++] = *p++; value_buf[i] = 0; +#ifdef _WIN32 if (!_stricmp(name_buf, "Cookie")) { +#else + if (!strcasecmp(name_buf, "Cookie")) { +#endif ParseCookie(value_buf); } else { diff --git a/NetEx/HttpResponse.cpp b/NetEx/HttpResponse.cpp index de64f9d..2047612 100644 --- a/NetEx/HttpResponse.cpp +++ b/NetEx/HttpResponse.cpp @@ -9,6 +9,9 @@ #include <ctype.h> #include <stdio.h> #include <string.h> +#ifndef _WIN32 +#include <strings.h> +#endif #include "HttpParam.h" #include "List.h" @@ -241,7 +244,11 @@ HttpResponse::ParseResponse(Text response) value_buf[i++] = *p++; value_buf[i] = 0; +#ifdef _WIN32 if (!_stricmp(name_buf, "Set-Cookie")) { +#else + if (!strcasecmp(name_buf, "Set-Cookie")) { +#endif ParseCookie(value_buf); } else { @@ -305,7 +312,11 @@ HttpResponse::ParseCookie(const char* param) p++; // ignore the version attribute +#ifdef _WIN32 if (_stricmp(name, "version")) { +#else + if (strcasecmp(name, "version")) { +#endif HttpParam* param = new HttpParam(name, data); if (param) cookies.append(param); |