From 9501c7b976dc208d4ab6b9f92764aca9c46aa6a7 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 13 Feb 2021 14:06:46 +0100 Subject: mod_http_file_share: Support sending 100 Continue E.g. curl will ask for this when sending large uploads. Removes a delay while it waits for an error or go-agead. --- plugins/mod_http_file_share.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index 01f204eb..2af4e0ca 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -233,6 +233,9 @@ function handle_upload(event, path) -- PUT /upload/:slot end request.body_sink = fh; if request.body == false then + if request.headers.expect == "100-continue" then + request.conn:write("HTTP/1.1 100 Continue\r\n\r\n"); + end return true; end end -- cgit v1.2.3