From d1baa9d754ef7d860b3bc0501cf90cd57ca54c37 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 14 Jun 2025 15:22:02 +0300 Subject: return of missing HTTP response line to logs --- src/mir_app/src/netlib_http.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/netlib_http.cpp b/src/mir_app/src/netlib_http.cpp index fbe4dad4de..50e3cf6bc2 100644 --- a/src/mir_app/src/netlib_http.cpp +++ b/src/mir_app/src/netlib_http.cpp @@ -106,7 +106,7 @@ static bool isSecureStr(const char *str) return false; } -static void DumpHttpHeaders(HNETLIBCONN nlc, MHttpHeaders *nlhr, int flags, const char *pszInitStr = nullptr) +static void DumpHttpHeaders(HNETLIBCONN nlc, MHttpHeaders *nlhr, int flags, const char *pszInitStr) { int dumpflags = (flags & NLHRF_DUMPASTEXT) ? MSG_DUMPASTEXT : 0; @@ -436,6 +436,8 @@ static MHttpResponse* Netlib_RecvHttpHeaders(NetlibConnection *nlc, int flags) SetLastError(ERROR_HANDLE_EOF); return nullptr; } + + CMStringA szFirstLine(buffer, firstLineLength); // Make sure all headers arrived MBinBuffer buf; @@ -490,7 +492,7 @@ static MHttpResponse* Netlib_RecvHttpHeaders(NetlibConnection *nlc, int flags) pbuffer = peol + 1; } - DumpHttpHeaders(nlc, nlhr.get(), flags); + DumpHttpHeaders(nlc, nlhr.get(), flags, szFirstLine); // remove processed data buf.remove(bytesPeeked); -- cgit v1.2.3