<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/test, branch str-v4</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Tests: fixed _check_processes() checks in "--restart" mode.</title>
<updated>2022-11-15T01:07:41+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-11-15T01:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9ea5ed2813c7dc57c8997ef21d779baae19d784c'/>
<id>9ea5ed2813c7dc57c8997ef21d779baae19d784c</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 migration test.</title>
<updated>2022-11-15T00:56:49+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-11-15T00:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=bb11ef694ce49343a11bafee836addb6dd125848'/>
<id>bb11ef694ce49343a11bafee836addb6dd125848</id>
<content type='text'>
Migration of "share" behaviour was dropped after b57b4749b993.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Migration of "share" behaviour was dropped after b57b4749b993.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: fixed assertion in test_variables_dynamic.</title>
<updated>2022-11-15T00:42:12+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-11-15T00:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=2c2156e236c18a67922617a4e43fb9eb1da0ab9e'/>
<id>2c2156e236c18a67922617a4e43fb9eb1da0ab9e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: features and options checks improved.</title>
<updated>2022-11-15T00:39:21+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-11-15T00:39:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=0d3b31e6710afe4348eb25f1602f5271c92b9a77'/>
<id>0d3b31e6710afe4348eb25f1602f5271c92b9a77</id>
<content type='text'>
Now version output evaluates only once.
OpenSSL checks more carefully.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now version output evaluates only once.
OpenSSL checks more carefully.
</pre>
</div>
</content>
</entry>
<entry>
<title>PHP: allowed to specify URLs without a trailing '/'.</title>
<updated>2022-11-02T14:22:39+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2022-09-16T13:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=a03274456b54cbc39e220b9dd73c3fc3fb935e46'/>
<id>a03274456b54cbc39e220b9dd73c3fc3fb935e46</id>
<content type='text'>
Both @lucatacconi &amp; @mwoodpatrick reported what appears to be the same
issue on GitHub. Namely that when using the PHP language module and
trying to access a URL that is a directory but without specifying the
trailing '/', they were getting a '503 Service Unavailable' error.

Note: This is when _not_ using the 'script' option.

E.g with the following config

  {
      "listeners": {
          "[::1]:8080": {
              "pass": "applications/php"
          }
      },

      "applications": {
          "php": {
              "type": "php",
              "root": "/var/tmp/unit-php"
          }
      }
  }

and with a directory path of /var/tmp/unit-php/foo containing an
index.php, you would see the following

  $ curl http://localhost/foo
  &lt;title&gt;Error 503&lt;/title&gt;
  Error 503

However

  $ curl http://localhost/foo/

would work and serve up the index.php

This commit fixes the above so you get the desired behaviour without
specifying the trailing '/' by doing the following

  1] If the URL doesn't end in .php and doesn't have a trailing '/'
     then check if the requested path is a directory.

  2) If it is a directory then create a 301 re-direct pointing to it.
     This matches the behaviour of the likes of nginx, Apache and
     lighttpd.

     This also matches the behaviour of the "share" action in Unit.

This doesn't effect the behaviour of the 'script' option which bypasses
the nxt_php_dynamic_request() function.

This also adds a couple of tests to test/test_php_application.py to
ensure this continues to work.

Closes: &lt;https://github.com/nginx/unit/issues/717&gt;
Closes: &lt;https://github.com/nginx/unit/issues/753&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both @lucatacconi &amp; @mwoodpatrick reported what appears to be the same
issue on GitHub. Namely that when using the PHP language module and
trying to access a URL that is a directory but without specifying the
trailing '/', they were getting a '503 Service Unavailable' error.

Note: This is when _not_ using the 'script' option.

E.g with the following config

  {
      "listeners": {
          "[::1]:8080": {
              "pass": "applications/php"
          }
      },

      "applications": {
          "php": {
              "type": "php",
              "root": "/var/tmp/unit-php"
          }
      }
  }

and with a directory path of /var/tmp/unit-php/foo containing an
index.php, you would see the following

  $ curl http://localhost/foo
  &lt;title&gt;Error 503&lt;/title&gt;
  Error 503

However

  $ curl http://localhost/foo/

would work and serve up the index.php

This commit fixes the above so you get the desired behaviour without
specifying the trailing '/' by doing the following

  1] If the URL doesn't end in .php and doesn't have a trailing '/'
     then check if the requested path is a directory.

  2) If it is a directory then create a 301 re-direct pointing to it.
     This matches the behaviour of the likes of nginx, Apache and
     lighttpd.

     This also matches the behaviour of the "share" action in Unit.

This doesn't effect the behaviour of the 'script' option which bypasses
the nxt_php_dynamic_request() function.

This also adds a couple of tests to test/test_php_application.py to
ensure this continues to work.

Closes: &lt;https://github.com/nginx/unit/issues/717&gt;
Closes: &lt;https://github.com/nginx/unit/issues/753&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: added tests for the $request_time variable.</title>
<updated>2022-10-13T09:13:57+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-10-13T09:13:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=af5903ff4ee83a0c632a07828ed80a0b5f40aefd'/>
<id>af5903ff4ee83a0c632a07828ed80a0b5f40aefd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: reworked "test_variables.py".</title>
<updated>2022-10-11T12:49:44+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-10-11T12:49:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=08dab702cb4140613e942b86f54824b3c7dea2ad'/>
<id>08dab702cb4140613e942b86f54824b3c7dea2ad</id>
<content type='text'>
Access log used for the variables testing instead of limited routing.
Added missed test for $status variable.
Some tests moved from "test_access_log.py" to "test_variables.py".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Access log used for the variables testing instead of limited routing.
Added missed test for $status variable.
Some tests moved from "test_access_log.py" to "test_variables.py".
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: don't try to return response when "no_recv" is True.</title>
<updated>2022-10-11T12:49:10+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-10-11T12:49:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=8e1e0471914b39da0634a23c4231ce98021a4cf7'/>
<id>8e1e0471914b39da0634a23c4231ce98021a4cf7</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 test with proxy for status.</title>
<updated>2022-09-27T11:08:36+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-09-27T11:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=97fa587c9f80ecee7bd2e2be173e700d011b09b9'/>
<id>97fa587c9f80ecee7bd2e2be173e700d011b09b9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP: fixed cookie parsing.</title>
<updated>2022-09-18T18:45:44+00:00</updated>
<author>
<name>Zhidao HONG</name>
<email>z.hong@f5.com</email>
</author>
<published>2022-09-18T18:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=76df62a6236eba2ae1ea7ffe7b9599418b044a01'/>
<id>76df62a6236eba2ae1ea7ffe7b9599418b044a01</id>
<content type='text'>
The fixing supports the cookie value with the '=' character.

This is related to #756 PR on Github.
Thanks to changxiaocui.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fixing supports the cookie value with the '=' character.

This is related to #756 PR on Github.
Thanks to changxiaocui.
</pre>
</div>
</content>
</entry>
</feed>
