Welcome! Log In Create A New Profile

Advanced

Re: NJS Questions and/or Bugs

Sergey A. Osokin
August 11, 2021 10:22PM
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 me.
>
> Here’s the key config info.
>
> In the location block for the route that I’m testing:
>
> add_header Content-Type text/plain;
> js_content dbadmin.access;
>
> The dbadmin.access function just has this at the top of the function right now:
> r.return(200, JSON.stringify(r.args));

Could you please share a couple of things:

- whole dbadmin.js file;
- a server block from nginx configuration file with a full location
description

For development and testing I'd recommend to use:
- curl command line utility, i.e. something like:
% curl -v --data-binary @test.bin http://127.0.0.1:8080/test?foo=bar\&baz=1

- enable debugging as described at http://nginx.org/en/docs/debugging_log.html
so you'll be able to see what's going on with a request processing

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

NJS Questions and/or Bugs

Lance Dockins August 11, 2021 08:44PM

Re: NJS Questions and/or Bugs

Sergey A. Osokin August 11, 2021 09:52PM

Re: NJS Questions and/or Bugs

Lance Dockins August 11, 2021 10:06PM

Re: NJS Questions and/or Bugs

Sergey A. Osokin August 11, 2021 10:22PM

Re: NJS Questions and/or Bugs

Lance Dockins August 11, 2021 10:32PM

Re: NJS Questions and/or Bugs

Lance Dockins August 11, 2021 10:40PM

Re: NJS Questions and/or Bugs

Sergey A. Osokin August 11, 2021 10:44PM

Re: NJS Questions and/or Bugs

Lance Dockins August 11, 2021 10:50PM

Re: NJS Questions and/or Bugs

Sergey A. Osokin August 11, 2021 10:58PM

Re: NJS Questions and/or Bugs

Lance Dockins August 11, 2021 11:02PM

Re: NJS Questions and/or Bugs

Lance Dockins August 11, 2021 11:46PM

Re: NJS Questions and/or Bugs

Lance Dockins August 11, 2021 11:52PM

Re: NJS Questions and/or Bugs

Sergey A. Osokin August 11, 2021 10:42PM

Re: NJS Questions and/or Bugs

Dmitry Volyntsev August 12, 2021 02:16AM

Re: NJS Questions and/or Bugs

Lance Dockins August 12, 2021 08:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
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