summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/http.lua
diff options
context:
space:
mode:
Diffstat (limited to 'libs/web/luasrc/http.lua')
-rw-r--r--libs/web/luasrc/http.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/web/luasrc/http.lua b/libs/web/luasrc/http.lua
index bac997952..d34e253a5 100644
--- a/libs/web/luasrc/http.lua
+++ b/libs/web/luasrc/http.lua
@@ -258,6 +258,13 @@ function write(content, src_err)
end
end
+--- Splice data from a filedescriptor to the client.
+-- @param fp File descriptor
+-- @param size Bytes to splice (optional)
+function splice(fd, size)
+ coroutine.yield(6, fd, size)
+end
+
--- Redirects the client to a new URL and closes the connection.
-- @param url Target URL
function redirect(url)