Age | Commit message (Collapse) | Author | Files | Lines |
|
Unit 1.32.1 release.
|
|
|
|
|
|
|
|
Unit 1.32.0 release.
|
|
|
|
|
|
@filiphanes requested support for bytearray
and memoryview in the request body here:
<https://github.com/nginx/unit/issues/648>
This patch implements bytearray body support only.
Memoryview body still need to be implemented.
|
|
|
|
This commit introduces the 'vars' JavaScript object to NJS,
enabling direct access to native variables such as $uri and $arg_foo.
The syntax is `${vars.var_name}` or `${'vars[var_name]'}`.
For example:
{
"action": {
"share": "`/www/html${vars.uri}`"
}
}
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
* Take options as well as requestListener
Unit-http have not kept up with the signature of nodejs's http package
development. Nodejs allows an optional `options` object to be passed to
the `createServer` function, we didn't. This resulted in function
signature errors when user code that did make use of the options arg
tried to call unit's replaced function.
This change changes the signature to be more in line with how nodejs
does it discarding it and printing a message to stdout.
* Add test file to start node application with options
* Add changes to docs/changes.xml
Closes: https://github.com/nginx/unit/issues/1043
|
|
|
|
|
|
According to the Node.js documenation this variable
should only include numbering scheme.
Thanks to @dbit-xia.
Closes: https://github.com/nginx/unit/issues/1085
|
|
This closes #1006 issue on GitHub.
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This variable contains a string that is formed using random data and
can be used as a unique request identifier.
This closes #714 issue on GitHub.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also separate header variables and "response_headers" option features.
|
|
|
|
|
|
|
|
This commit adds the variable $response_header_NAME.
|
|
|
|
When a variable is accessed in the Unit configuration, the value is cached.
This was useful prior to the URI rewrite feature, but now that the URI (more
precisely, the request target) can be rewritten, the contents of the variable
$uri (which contains the path part of the request target, and is decoded)
should not be cached anymore, or at least the cached value should be invalidated
after a URI rewrite.
Example:
{
"rewrite": "/prefix$uri",
"share": "$uri"
}
For a request line like GET /foo?bar=baz HTTP/1.1\r\n, the expected file
served in the response would be /prefix/foo, but due to the caching issue,
Unit currently serves /foo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit introduced the basic URI rewrite. It allows users to change request URI. Note the "rewrite" option ignores the contained query if any and the query from the request is preserverd.
An example:
"routes": [
{
"match": {
"uri": "/v1/test"
},
"action": {
"return": 200
}
},
{
"action": {
"rewrite": "/v1$uri",
"pass": "routes"
}
}
]
Reviewed-by: Alejandro Colomar <alx@nginx.com>
|
|
Pp is used to separate paragraphs, not to introduce them. A Pp macro
call right after Sh is wrong, and it is ignored by the formatter, which
reports a warning about it.
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
Reviewed-by: Artem Konev <a.konev@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
The Authors section is meant to list the main authors. However, the
section only contained the copyright notice, so the Copyright section
seems more appropriate. While we change that, it makes sense to also
specify the license, and update the copyright year.
Reviewed-by: Liam Crilly <liam@nginx.com>
Reviewed-by: Artem Konev <a.konev@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
We've applied significant changes to the page, so let's update the date.
While we're at it, let's change it to use ISO 8601 format for the date.
Reviewed-by: Artem Konev <a.konev@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
Not setting it produces the default value of 'BSD' or 'GNU', depending
on the software formatting the manual page. We're neither, so let's
specify our project name. See groff_mdoc(7). While mandoc_mdoc(7)
formally says that .Os is only for the operating system, and not for the
package name, that's an oversimplification, and only meant for software
inherent to the OS. For portable software, mandoc(1)'s (and OpenBSD's)
maintainer Ingo Schwarze agreed that it is more sensible to specify the
project name (and optionally, the version).
Reviewed-by: Artem Konev <a.konev@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
Reviewed-by: Artem Konev <a.konev@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|
|
There was a recent unanimous agreement by maintainers of groff, mandoc,
the Linux man-pages, and other relevant programmers, that manual pages
should not use uppercase unnecessarily. Use of uppercase in the title
and in the section's titles dates from before one could use bold,
italics, and other such formatting, so that it was the way of giving
more importance to certain parts of a page. Nowadays, we use bold, so
uppercase is unnecessary.
Moreover, using uppercase in the title is bad, since it removes
information. If we keep the exact casing used in the program (or
function) name, we provide more information. And anyway, if users want
to read in uppercase, they can program certain mdoc(7) or man(7) macros
to transform their arguments into uppercase. This could be done via
</etc/groff/mdoc.local> and </etc/groff/man.local>.
There's a plan of transforming OpenBSD pages and the Linux man-pages to
stop using uppercase. Other projects may join. That will likely happen
in the following months. Let's align with this.
Reviewed-by: Artem Konev <a.konev@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
|