summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
commit110fdc1157d94f5d787a21c60163681767fdd6c4 (patch)
tree3a401fa5b6d10e397784f4a7aa1cda38beee9fb9 /plugins/MirLua
parent74c01c7fb7862ec01ad27c4b225b08b7aa0f3b0a (diff)
more strict constructor of MHttpRequest to avoid quirks
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/Modules/m_http.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/MirLua/src/Modules/m_http.cpp b/plugins/MirLua/src/Modules/m_http.cpp
index fcc0365078..bbad6165fb 100644
--- a/plugins/MirLua/src/Modules/m_http.cpp
+++ b/plugins/MirLua/src/Modules/m_http.cpp
@@ -4,7 +4,7 @@
static MHttpRequest* CreateRequest()
{
- MHttpRequest *request = new MHttpRequest();
+ MHttpRequest *request = new MHttpRequest(REQUEST_GET);
request->flags = NLHRF_HTTP11 | NLHRF_NODUMP;
return request;
}
@@ -269,9 +269,8 @@ static int request_Send(lua_State *L)
{
MHttpRequest *request = *(MHttpRequest**)luaL_checkudata(L, 1, MT_NETLIBHTTPREQUEST);
- MHttpRequest *newRequest = new MHttpRequest();
+ MHttpRequest *newRequest = new MHttpRequest(request->requestType);
newRequest->flags = request->flags;
- newRequest->requestType = request->requestType;
newRequest->m_szUrl = request->m_szUrl;
newRequest->m_szParam = request->m_szParam;
newRequest->timeout = request->timeout;