diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-06-09 17:19:33 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-06-09 17:21:57 -0400 |
commit | 9ac5da2720f9c826c5ac88cbee2cfdbd810eba43 (patch) | |
tree | ca9d38a527236ec39e7c356b206975b3dab3255a /src/mod_magnet.c | |
parent | f86b448799fc7f55274a1d61583ff3d390f58e0b (diff) | |
download | lighttpd-git-9ac5da2720f9c826c5ac88cbee2cfdbd810eba43.tar.gz |
[mod_magnet] reset for http-response-send-file
reset r->http_status and clear response body for http-response-send-file
called from magnet.attract-response-start-to in order to match
http_response_send_file() behavior to send ETag, replace response body
Diffstat (limited to 'src/mod_magnet.c')
-rw-r--r-- | src/mod_magnet.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_magnet.c b/src/mod_magnet.c index 0fe5912a..3997a521 100644 --- a/src/mod_magnet.c +++ b/src/mod_magnet.c @@ -517,6 +517,8 @@ static int magnet_stat_field(lua_State *L) { case 'h': { /* http-response-send-file */ if (0 != strcmp(k.ptr, "http-response-send-file")) break; request_st * const r = magnet_get_request(L); + r->http_status = 0; + http_response_body_clear(r, 0); http_response_send_file(r, &sce->name, sce); lua_pushinteger(L, r->http_status); return 1; |