Thank you Dmitry. This helps a ton. I will note that the post key/value pair
solution only works for URL encoded post values. If the enctype is set to
multipart/form-data, you get get the data without writing your own data parser.
I already wrote one for URL encoded types and was working on
Hi Lance,
Thanks for your detailed feedback.
>What exactly should r.variables and r.rawVariables contain? ...
r.variables and r.rawVariables are special objects, because they are
created on the fly. There is no way to get all the possible variable
names from nginx. So
Also, just to be clear, you’re saying that r.args should include parsed POST
vars? Obviously it includes query string/GET vars. That works. But the
values in the POST body do not show up in the args output. And again, I
basically see nothing coming up in the output for variables.
This:
#
Something is definitely wrong here but I’ve stripped most of the more advanced
configuration out of the vhost conf, removed all modules other than NJS, and
set the Nginx compile to pretty much the most vanilla compile option set that I
can to rule out the possibility of 3rd party interference
Unfortunately, we can’t really use standard packages. We need extra modules.
I’m recompiling and enabling debug now. The modules we’re using aren’t
anything super abnormal and we might replace one of them with NJS at some
point. All I know for sure is that this seems to work just fine with
On Wed, Aug 11, 2021 at 09:48:48PM -0500, Lance Dockins wrote:
> I’ll try recompiling nginx with that to see if that changes anything.
I'd recommend to use official packages for Linux from the following URL,
http://nginx.org/en/linux_packages.html
> In fact, even your code is returning nothing.
I’ll try recompiling nginx with that to see if that changes anything.
Also, to be clear, I know that r.internalRedirect won’t happen. I actually
stripped the access function down to almost it’s barest content to demonstrate
the point and left that code in there just to demo what we do at the
On Wed, Aug 11, 2021 at 09:38:50PM -0500, Lance Dockins wrote:
> Oh… and to reiterate, I get similarly empty object responses
> when access the variables and rawVariables objects. Most of
> them seem to be empty objects, actually.
I'd recommend to enable nginx debugging log as I mentioned
On Wed, Aug 11, 2021 at 09:31:41PM -0500, Lance Dockins wrote:
> Hi Sergey,
>
...
>
> dbadmin.js
> function access(r){
> r.return(200, JSON.stringify(r.args));
>
> r.internalRedirect('@php');
Two points:
- missing return directive here;
- r.internalRedirect will never happend because
Oh… and to reiterate, I get similarly empty object responses when access the
variables and rawVariables objects. Most of them seem to be empty objects,
actually.
--
Lance Dockins
On Aug 11, 2021, 9:31 PM -0500, Lance Dockins , wrote:
> Hi Sergey,
>
> Sure. The tool that I’m using for HTTP
Hi Sergey,
Sure. The tool that I’m using for HTTP testing is just a GUI interface
directly to HTTP so it works the same as a browser would since it’s just
straight HTTP. It supports curl mode too but that’s just a alternative wrapper
for HTTP and none of the methods that we’re using to
Hi Lance,
On Wed, Aug 11, 2021 at 09:05:32PM -0500, Lance Dockins wrote:
> Hi Sergey,
>
> Thank you. Perhaps something is going wrong with the implementation
> of r.args that we’re using. I’m just getting an empty JS object for
> POST vars. Args only seems to work for query string vars for
Hi Sergey,
Thank you. Perhaps something is going wrong with the implementation of r.args
that we’re using. I’m just getting an empty JS object for POST vars. Args
only seems to work for query string vars for me.
Here’s the key config info.
In the location block for the route that I’m
Hi Lance,
hope you're doing well.
On Wed, Aug 11, 2021 at 07:43:12PM -0500, Lance Dockins wrote:
> We’ve been experimenting with NJS in its current form (as compared
> with the more established LuaJIT integration provided by OpenResty)
> and it’s surfaced a series of questions about objects and
14 matches
Mail list logo