summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-06 13:53:13 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-06 13:53:13 +0300
commite1d4521c5530e7f971f15fdec358f27e563553dd (patch)
tree7f73404af7c24a43b657e216e1545bcf5da16a77 /src
parent159d13282207fd1e3e1c030e1d254013f2e59de1 (diff)
code cleaning
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/netlib_http.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mir_app/src/netlib_http.cpp b/src/mir_app/src/netlib_http.cpp
index 259b6aa670..fa74322489 100644
--- a/src/mir_app/src/netlib_http.cpp
+++ b/src/mir_app/src/netlib_http.cpp
@@ -604,7 +604,7 @@ int Netlib_SendHttpRequest(HNETLIBCONN nlc, MHttpRequest *nlhr, MChunkHandler *p
else if (!mir_strcmpi(it->szName, "Authorization")) doneAuthHeader = true;
else if (!mir_strcmpi(it->szName, "Connection")) doneConnection = true;
if (it->szValue == nullptr) continue;
- httpRequest.AppendFormat("%s: %s\r\n", it->szName, it->szValue);
+ httpRequest.AppendFormat("%s: %s\r\n", it->szName.get(), it->szValue.get());
}
if (szHost && !doneHostHeader)
httpRequest.AppendFormat("%s: %s\r\n", "Host", szHost);
@@ -1047,6 +1047,12 @@ MIR_APP_DLL(MHttpResponse *) Netlib_HttpTransaction(HNETLIBUSER nlu, MHttpReques
nlhr->flags |= NLHRF_SMARTREMOVEHOST;
+ if (!nlhr->m_szParam.IsEmpty() && nlhr->requestType == REQUEST_GET) {
+ nlhr->m_szUrl.AppendChar('?');
+ nlhr->m_szUrl += nlhr->m_szParam;
+ nlhr->m_szParam.Empty();
+ }
+
if (!nlhr->FindHeader("User-Agent")) {
char szUserAgent[64], szMirandaVer[64];
strncpy_s(szMirandaVer, MIRANDA_VERSION_STRING, _TRUNCATE);