diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-16 15:54:52 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-16 15:54:52 +0300 |
commit | ea325162c0e04fbb95d101a744ac605bac47492d (patch) | |
tree | 748adccec45d4e5ac9e433d837f342ecc1324ac2 /src/mir_app | |
parent | 8208d3f157e8133ca958c4ba47ec9caea8a162d5 (diff) |
merge
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/netlib_http.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mir_app/src/netlib_http.cpp b/src/mir_app/src/netlib_http.cpp index de6cf39c91..a03dd20341 100644 --- a/src/mir_app/src/netlib_http.cpp +++ b/src/mir_app/src/netlib_http.cpp @@ -292,7 +292,9 @@ static int HttpPeekFirstResponseLine(NetlibConnection *nlc, uint32_t dwTimeoutTi if ((peol = strchr(buffer, '\n')) != nullptr)
break;
- if ((int)mir_strlen(buffer) < bytesPeeked) {
+ int iLen = (int)mir_strlen(buffer);
+ if (iLen < bytesPeeked) {
+ Netlib_Logf(nlc->nlu, "%s %d: %s Failed (%u %u)", __FILE__, __LINE__, "HttpPeekFirstResponseLine", iLen, bytesPeeked);
SetLastError(ERROR_BAD_FORMAT);
return 0;
}
@@ -306,6 +308,7 @@ static int HttpPeekFirstResponseLine(NetlibConnection *nlc, uint32_t dwTimeoutTi }
if (peol == buffer) {
+ Netlib_Logf(nlc->nlu, "%s %d: %s Failed", __FILE__, __LINE__, "HttpPeekFirstResponseLine");
SetLastError(ERROR_BAD_FORMAT);
return 0;
}
@@ -313,6 +316,7 @@ static int HttpPeekFirstResponseLine(NetlibConnection *nlc, uint32_t dwTimeoutTi *peol = '\0';
if (_strnicmp(buffer, "HTTP/", 5)) {
+ Netlib_Logf(nlc->nlu, "%s %d: %s Failed", __FILE__, __LINE__, "HttpPeekFirstResponseLine");
SetLastError(ERROR_BAD_FORMAT);
return 0;
}
|