Welcome! Log In Create A New Profile

Advanced

Re: using location.capture to post a form

Yichun Zhang (agentzh)
September 18, 2014 01:16PM
Hello!

On Thu, Sep 18, 2014 at 9:02 AM, jpsonweb wrote:
> I was able to post the parameter from nginx by passing the arguments using
> this.
> local maken_res = ngx.location.capture("/test", { method = ngx.HTTP_POST,
> args = { pagelayout = dev_res_encoded }});
>

You're passing your args via URI arguments rather than POST body. See

https://github.com/openresty/lua-nginx-module#ngxlocationcapture

"* args
specify the subrequest's URI query arguments (both string value and
Lua tables are accepted)
"

> This works only when post parameter size is less than 81568 characters. When
> the parameter size is greater than 81568, we get error 502.
>

Apparently you're hitting the URL length limit on your backend server.

BTW, it's better to post such questions to the openresty-en mailing
list instead: https://groups.google.com/group/openresty-en

Regards,
-agentzh

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

using location.capture to post a form

jpsonweb September 16, 2014 02:24PM

Re: using location.capture to post a form

Yichun Zhang (agentzh) September 16, 2014 02:52PM

Re: using location.capture to post a form

jpsonweb September 18, 2014 12:02PM

Re: using location.capture to post a form

Yichun Zhang (agentzh) September 18, 2014 01:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready