Fix. Unset trailer data.

This commit is contained in:
Alexey Melnichuk 2019-04-06 20:33:52 +03:00
parent 43c864ad9a
commit e9ac10f6e2

View File

@ -975,7 +975,7 @@ static int lcurl_easy_unset_TRAILERFUNCTION(lua_State *L){
if(code != CURLE_OK){
return lcurl_fail_ex(L, p->err_mode, LCURL_ERROR_EASY, code);
}
curl_easy_setopt(p->curl, CURLOPT_TRAILERFUNCTION, NULL);
curl_easy_setopt(p->curl, CURLOPT_TRAILERDATA, NULL);
luaL_unref(L, LCURL_LUA_REGISTRY, p->trailer.cb_ref);
luaL_unref(L, LCURL_LUA_REGISTRY, p->trailer.ud_ref);