Commit 7ac37de Dr.Abc
committed
1 parent 33d52bf commit 7ac37de Copy full SHA for 7ac37de
File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ CHttpClientItem::CHttpClientItem(httpContext_s* ctx) : IUtilHTTPCallbacks(){
112
112
m_pRequest = g_pUtilHTTPClient->CreateSyncRequest (m_hContext.url .c_str (), m_hContext.method , this );
113
113
if (m_pCookieJar)
114
114
m_pRequest->SetField (" Set-Cookie" , m_pCookieJar->Get ().c_str ());
115
+ m_pRequest->SetAutoDestroyOnFinish (true );
115
116
}
116
117
CHttpClientItem* CHttpClientItem::Start (){
117
118
if (!m_pRequest)
@@ -130,8 +131,8 @@ IUtilHTTPResponse* CHttpClientItem::StartSync(){
130
131
if (m_pCookieJar) {
131
132
char cookiebuf[MAX_COOKIE_LENGTH];
132
133
memset (cookiebuf, 0 , MAX_COOKIE_LENGTH);
133
- reb->GetHeader (" Set-Cookie" , cookiebuf, MAX_COOKIE_LENGTH);
134
- m_pCookieJar->Set (cookiebuf);
134
+ if ( reb->GetHeader (" Set-Cookie" , cookiebuf, MAX_COOKIE_LENGTH))
135
+ m_pCookieJar->Set (cookiebuf);
135
136
}
136
137
return reb;
137
138
}
You can’t perform that action at this time.
0 commit comments