From ce10ea25b750f23c558a5920cd2b21d00212776a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Aug 2015 20:26:04 +0000 Subject: - all wrongly used macroses replaced with correcc ones; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@15122 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HTTPServer/src/HttpUser.cpp | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'plugins/HTTPServer/src/HttpUser.cpp') diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index 99c8113042..ede33c5722 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -314,7 +314,7 @@ void CLHttpUser::SendRedir(int iErrorCode, const char * pszError, const char * p "\n" "\r\n" "\r\n", - iErrorCode, pszError, szCurrTime, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), pszRedirect, iErrorCode, pszError, pszError, pszDescription, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM)); + iErrorCode, pszError, szCurrTime, __VERSION_STRING_DOTS, pszRedirect, iErrorCode, pszError, pszError, pszDescription, __VERSION_STRING_DOTS); Netlib_Send(hConnection, szBuff, dwBytesToWrite, 0); } @@ -628,7 +628,8 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) return true; } - const char szHttpPartial[] = "HTTP/1.1 206 Partial Content\r\n" + dwBytesToWrite = mir_snprintf(szBuf, + "HTTP/1.1 206 Partial Content\r\n" "Connection: Keep-Alive\r\n" "Date: %s\r\n" "Server: MirandaWeb/%s\r\n" @@ -638,21 +639,13 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) "Content-Type: %s\r\n" "Content-Range: bytes %d-%d/%d\r\n" "Last-Modified: %s\r\n" - "\r\n"; - - dwBytesToWrite = mir_snprintf(szBuf, szHttpPartial, - szCurTime, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - szETag, - dwDataToSend, - pszGetMimeType(pszRealPath), - dwFileStart, - (dwFileStart + dwDataToSend - 1), - nDataSize, - szFileTime); + "\r\n", + szCurTime, __VERSION_STRING_DOTS, szETag, dwDataToSend, pszGetMimeType(pszRealPath), + dwFileStart, (dwFileStart + dwDataToSend - 1), nDataSize, szFileTime); } else { - const char szHttpOk[] = "HTTP/1.1 200 OK\r\n" + dwBytesToWrite = mir_snprintf(szBuf, + "HTTP/1.1 200 OK\r\n" "Connection: Keep-Alive\r\n" "Date: %s\r\n" "Server: MirandaWeb/%s\r\n" @@ -661,15 +654,8 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) "Content-Length: %d\r\n" "Content-Type: %s\r\n" "Last-Modified: %s\r\n" - "\r\n"; - - dwBytesToWrite = mir_snprintf(szBuf, szHttpOk, - szCurTime, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - szETag, - nDataSize, - pszGetMimeType(pszRealPath), - szFileTime); + "\r\n", + szCurTime, __VERSION_STRING_DOTS, szETag, nDataSize, pszGetMimeType(pszRealPath), szFileTime); } Netlib_Send(hConnection, szBuf, dwBytesToWrite, 0); -- cgit v1.2.3