diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 |
commit | d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (patch) | |
tree | a6f925c63bc31e4b4dba301183cc3b429d52d816 /src/modules/netlib | |
parent | ce2d4f19e3f810b282eb7d47d470d426ff459e1f (diff) |
new sorting functions applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib')
-rw-r--r-- | src/modules/netlib/netlibhttp.cpp | 26 | ||||
-rw-r--r-- | src/modules/netlib/netlibhttpproxy.cpp | 2 | ||||
-rw-r--r-- | src/modules/netlib/netlibopts.cpp | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/modules/netlib/netlibhttp.cpp b/src/modules/netlib/netlibhttp.cpp index b7a529853b..a42e9ea700 100644 --- a/src/modules/netlib/netlibhttp.cpp +++ b/src/modules/netlib/netlibhttp.cpp @@ -53,7 +53,7 @@ struct ProxyAuth mir_free(szMethod);
}
static int Compare(const ProxyAuth* p1, const ProxyAuth* p2)
- { return lstrcmpiA(p1->szServer, p2->szServer); }
+ { return mir_strcmpi(p1->szServer, p2->szServer); }
};
struct ProxyAuthList : OBJLIST<ProxyAuth>
@@ -202,7 +202,7 @@ static NetlibConnection* NetlibHttpProcessUrl(NETLIBHTTPREQUEST *nlhr, NetlibUse if (nlc != NULL) {
bool httpProxy = !(nloc.flags & NLOCF_SSL) && nlc->proxyType == PROXYTYPE_HTTP;
- bool sameHost = lstrcmpA(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort;
+ bool sameHost = mir_strcmp(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort;
if (!httpProxy && !sameHost) {
NetlibDoClose(nlc);
@@ -503,11 +503,11 @@ INT_PTR NetlibHttpSendRequest(WPARAM wParam, LPARAM lParam) doneHostHeader = doneContentLengthHeader = doneProxyAuthHeader = doneAuthHeader = 0;
for (i=0; i < nlhr->headersCount; i++) {
NETLIBHTTPHEADER &p = nlhr->headers[i];
- if (!lstrcmpiA(p.szName, "Host")) doneHostHeader = 1;
- else if (!lstrcmpiA(p.szName, "Content-Length")) doneContentLengthHeader = 1;
- else if (!lstrcmpiA(p.szName, "Proxy-Authorization")) doneProxyAuthHeader = 1;
- else if (!lstrcmpiA(p.szName, "Authorization")) doneAuthHeader = 1;
- else if (!lstrcmpiA(p.szName, "Connection")) continue;
+ if (!mir_strcmpi(p.szName, "Host")) doneHostHeader = 1;
+ else if (!mir_strcmpi(p.szName, "Content-Length")) doneContentLengthHeader = 1;
+ else if (!mir_strcmpi(p.szName, "Proxy-Authorization")) doneProxyAuthHeader = 1;
+ else if (!mir_strcmpi(p.szName, "Authorization")) doneAuthHeader = 1;
+ else if (!mir_strcmpi(p.szName, "Connection")) continue;
if (p.szValue == NULL) continue;
AppendToCharBuffer(&httpRequest, "%s: %s\r\n", p.szName, p.szValue);
}
@@ -1029,10 +1029,10 @@ next: for (i=0; i<nlhrReply->headersCount; i++) {
NETLIBHTTPHEADER &p = nlhrReply->headers[i];
- if (!lstrcmpiA(p.szName, "Content-Length"))
+ if (!mir_strcmpi(p.szName, "Content-Length"))
dataLen = atoi(p.szValue);
- if (!lstrcmpiA(p.szName, "Content-Encoding")) {
+ if (!mir_strcmpi(p.szName, "Content-Encoding")) {
cenc = i;
if (strstr(p.szValue, "gzip"))
cenctype = 1;
@@ -1040,11 +1040,11 @@ next: cenctype = 2;
}
- if (!lstrcmpiA(p.szName, "Connection"))
- close = !lstrcmpiA(p.szValue, "close");
+ if (!mir_strcmpi(p.szName, "Connection"))
+ close = !mir_strcmpi(p.szValue, "close");
- if (!lstrcmpiA(p.szName, "Transfer-Encoding") &&
- !lstrcmpiA(p.szValue, "chunked"))
+ if (!mir_strcmpi(p.szName, "Transfer-Encoding") &&
+ !mir_strcmpi(p.szValue, "chunked"))
{
chunked = true;
chunkhdr = i;
diff --git a/src/modules/netlib/netlibhttpproxy.cpp b/src/modules/netlib/netlibhttpproxy.cpp index 5980a1f5b1..47149e1174 100644 --- a/src/modules/netlib/netlibhttpproxy.cpp +++ b/src/modules/netlib/netlibhttpproxy.cpp @@ -119,7 +119,7 @@ static bool NetlibHttpGatewaySend(NetlibConnection *nlc, RequestType reqType, co NETLIBOPENCONNECTION nloc;
NetlibConnFromUrl(nlhrSend.szUrl, false, nloc);
- bool sameHost = lstrcmpA(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort;
+ bool sameHost = mir_strcmp(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort;
if (!sameHost)
{
diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp index 332e0f723a..92102b044e 100644 --- a/src/modules/netlib/netlibopts.cpp +++ b/src/modules/netlib/netlibopts.cpp @@ -105,7 +105,7 @@ static void CopySettingsStruct(NETLIBUSERSETTINGS *dest, NETLIBUSERSETTINGS *sou static void CombineSettingsStrings(char **dest, char **source)
{
- if (*dest != NULL && (*source == NULL || lstrcmpiA(*dest, *source))) { mir_free(*dest); *dest = NULL; }
+ if (*dest != NULL && (*source == NULL || mir_strcmpi(*dest, *source))) { mir_free(*dest); *dest = NULL; }
}
static void CombineSettingsStructs(NETLIBUSERSETTINGS *dest, DWORD *destFlags, NETLIBUSERSETTINGS *source, DWORD sourceFlags)
|