Hello!
On Wed, Oct 21, 2015 at 8:00 AM, Igor Clark wrote:
> But when I issue the MOVE request from lua:
>
> local from_url, to_url = "/my-url-1/", "/my-url-2/"
> ngx.req.set_header("Destination", to_url)
> local mv_res = ngx.location.capture( from_url, { method = ngx.HTTP_MOVE } )
>
> the request fails with a 400 Bad Request, and this shows up in the log:
>
> 2015/10/20 22:48:22 [error] 4515#0: *7 client sent no "Destination" header,
> client: 192.168.56.1, server: _, request: "POST /my-lua-handler HTTP/1.1",
> subrequest: "/my-url-1/", host: "my-server"
Thanks for the test case and report! Just fixed in the git master
branch of ngx_lua:
https://github.com/openresty/lua-nginx-module/commit/b948841c0
Best regards,
-agentzh