소스 검색

Logging HTTP proxy request and response

Source commit: dfe8b8079e7a1f4788128c474f0519c5fd43ae13
Martin Prikryl 8 년 전
부모
커밋
317d3ce830
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      source/filezilla/AsyncProxySocketLayer.cpp

+ 6 - 0
source/filezilla/AsyncProxySocketLayer.cpp

@@ -491,6 +491,9 @@ void CAsyncProxySocketLayer::OnReceive(int nErrorCode)
       char *pos = strstr(m_pStrBuffer, "\r\n");
       if (pos)
       {
+        CString status;
+        status.Format(L"HTTP proxy response: %s", UnicodeString(m_pStrBuffer).c_str());
+        LogSocketMessageRaw(FZ_LOG_PROGRESS, status);
         char *pos2 = strstr(m_pStrBuffer, " ");
         if (!pos2 || *(pos2+1)!='2' || pos2>pos)
         {
@@ -771,6 +774,9 @@ void CAsyncProxySocketLayer::OnConnect(int nErrorCode)
       delete [] pHost;
 
       USES_CONVERSION;
+      CString status;
+      status.Format(L"HTTP proxy command: %s", UnicodeString(str).c_str());
+      LogSocketMessageRaw(FZ_LOG_PROGRESS, status);
       int numsent=SendNext(str, strlen(str) );
       int nErrorCode=WSAGetLastError();
       if (numsent==SOCKET_ERROR)//nErrorCode!=WSAEWOULDBLOCK)