<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git, branch 1.27.0</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Generated Dockerfiles for Unit 1.27.0.</title>
<updated>2022-06-02T12:31:55+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-06-02T12:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=3d1fa29f1d03e392df534b6589d3e1d2ed883671'/>
<id>3d1fa29f1d03e392df534b6589d3e1d2ed883671</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added version 1.27.0 CHANGES.</title>
<updated>2022-06-02T12:30:52+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-06-02T12:30:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=cf9b5bdb35cb3895dc802d38f6e7d63af39865ad'/>
<id>cf9b5bdb35cb3895dc802d38f6e7d63af39865ad</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: fixed ES modules format in loader.mjs.</title>
<updated>2022-06-02T10:48:27+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-06-02T10:48:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=bd80039e07500021664a10984977cf64902a4b81'/>
<id>bd80039e07500021664a10984977cf64902a4b81</id>
<content type='text'>
Before Node.js v16.14.0 the "format" value in defaultResolve
was ignored so error was hidden.  For more information see:
https://github.com/nodejs/node/pull/40980
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before Node.js v16.14.0 the "format" value in defaultResolve
was ignored so error was hidden.  For more information see:
https://github.com/nodejs/node/pull/40980
</pre>
</div>
</content>
</entry>
<entry>
<title>Packaging: added support for RHEL 9.</title>
<updated>2022-05-31T14:35:39+00:00</updated>
<author>
<name>Konstantin Pavlov</name>
<email>thresh@nginx.com</email>
</author>
<published>2022-05-31T14:35:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=3d53bba5b373fc80d9bf7f3e50f63639637e228c'/>
<id>3d53bba5b373fc80d9bf7f3e50f63639637e228c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Logging a NULL pointer instead of passing it in the memcpy().</title>
<updated>2022-06-01T15:40:34+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-06-01T15:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=caa05887ff70bbd6338b129959a234ef56f1a287'/>
<id>caa05887ff70bbd6338b129959a234ef56f1a287</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: improved test for $request_uri variable.</title>
<updated>2022-06-01T15:40:27+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-06-01T15:40:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=161230b955ba8a6a22888c21f1b067de61af78dd'/>
<id>161230b955ba8a6a22888c21f1b067de61af78dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed minor issues in "changes.xml".</title>
<updated>2022-06-01T13:54:13+00:00</updated>
<author>
<name>Artem Konev</name>
<email>artem.konev@nginx.com</email>
</author>
<published>2022-06-01T13:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=0d5d81b2717a1707fc22020e6b27b4dea23d7595'/>
<id>0d5d81b2717a1707fc22020e6b27b4dea23d7595</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: removed deprecated ssl.PROTOCOL_TLSv1_2 constant.</title>
<updated>2022-05-31T23:15:15+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-05-31T23:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=880c8e51c335caa93a62c7cbcfb53391a1d7c54d'/>
<id>880c8e51c335caa93a62c7cbcfb53391a1d7c54d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: Added tests for $request_uri.</title>
<updated>2022-05-31T10:41:11+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx.manpages@gmail.com</email>
</author>
<published>2022-05-30T15:53:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=aee8b9bfb25df4490d137655d0ce097a6b9706fc'/>
<id>aee8b9bfb25df4490d137655d0ce097a6b9706fc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Var: Added $request_uri (as in NGINX).</title>
<updated>2022-05-31T10:40:02+00:00</updated>
<author>
<name>Alejandro Colomar</name>
<email>alx.manpages@gmail.com</email>
</author>
<published>2022-05-26T12:38:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9bf614cd0874e0ef9fda3145faacd3ef3a5fb0ed'/>
<id>9bf614cd0874e0ef9fda3145faacd3ef3a5fb0ed</id>
<content type='text'>
This supports a new variable $request_uri that contains the path
and the query (See RFC 3986, section 3).  Its contents are percent
encoded.  This is useful for example to redirect HTTP to HTTPS:

{
    "return": "301",
    "location": "https://$host$request_uri"
}

When &lt;http://example.com/foo%23bar?baz&gt; is requested, the server
redirects to &lt;https://example.com/foo%23bar?baz&gt;.

===

Testing:

//diff --git a/src/nxt_http_return.c b/src/nxt_http_return.c
//index 82c9156..adeb3a1 100644
//--- a/src/nxt_http_return.c
//+++ b/src/nxt_http_return.c
//@@ -196,6 +196,7 @@ nxt_http_return_send_ready(nxt_task_t *task,
    void *obj, void *data)
//         field-&gt;value = ctx-&gt;encoded.start;
//         field-&gt;value_length = ctx-&gt;encoded.length;
//     }
//+    fprintf(stderr, "ALX: target[%1$i]: &lt;%2$.*1$s&gt;\n",
    (int)r-&gt;target.length, r-&gt;target.start);
//
//     r-&gt;state = &amp;nxt_http_return_send_state;
//

{
	"listeners": {
		"*:81": {
			"pass": "routes/ru"
		}
	},

	"routes": {
		"ru": [{
			"action": {
				"return": 301,
				"location": "$request_uri"
			}
		}]
	}
}

$ curl -i http://localhost:81/*foo%2Abar?baz#arg
HTTP/1.1 301 Moved Permanently
Location: /*foo%2Abar?baz
Server: Unit/1.27.0
Date: Mon, 30 May 2022 16:04:30 GMT
Content-Length: 0

$ sudo cat /usr/local/unit.log | grep ALX
ALX: target[15]: &lt;/*foo%2Abar?baz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This supports a new variable $request_uri that contains the path
and the query (See RFC 3986, section 3).  Its contents are percent
encoded.  This is useful for example to redirect HTTP to HTTPS:

{
    "return": "301",
    "location": "https://$host$request_uri"
}

When &lt;http://example.com/foo%23bar?baz&gt; is requested, the server
redirects to &lt;https://example.com/foo%23bar?baz&gt;.

===

Testing:

//diff --git a/src/nxt_http_return.c b/src/nxt_http_return.c
//index 82c9156..adeb3a1 100644
//--- a/src/nxt_http_return.c
//+++ b/src/nxt_http_return.c
//@@ -196,6 +196,7 @@ nxt_http_return_send_ready(nxt_task_t *task,
    void *obj, void *data)
//         field-&gt;value = ctx-&gt;encoded.start;
//         field-&gt;value_length = ctx-&gt;encoded.length;
//     }
//+    fprintf(stderr, "ALX: target[%1$i]: &lt;%2$.*1$s&gt;\n",
    (int)r-&gt;target.length, r-&gt;target.start);
//
//     r-&gt;state = &amp;nxt_http_return_send_state;
//

{
	"listeners": {
		"*:81": {
			"pass": "routes/ru"
		}
	},

	"routes": {
		"ru": [{
			"action": {
				"return": 301,
				"location": "$request_uri"
			}
		}]
	}
}

$ curl -i http://localhost:81/*foo%2Abar?baz#arg
HTTP/1.1 301 Moved Permanently
Location: /*foo%2Abar?baz
Server: Unit/1.27.0
Date: Mon, 30 May 2022 16:04:30 GMT
Content-Length: 0

$ sudo cat /usr/local/unit.log | grep ALX
ALX: target[15]: &lt;/*foo%2Abar?baz&gt;
</pre>
</div>
</content>
</entry>
</feed>
