<?xml version="1.0"?>
<!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
<article name="Contributing Changes"
link="/en/docs/contributing_changes.html"
lang="en"
rev="7">
<section id="getting_sources" name="Getting Sources">
<para>
<link url="https://github.com">GitHub</link> is used
to store source code.
The <link url="https://github.com/nginx/nginx">repository</link> can be cloned
with the following command:
<programlisting>
git clone https://github.com/nginx/nginx.git
</programlisting>
</para>
</section>
<section id="formatting_changes" name="Formatting Changes">
<para>
Changes should be formatted according to the
<link doc="../docs/dev/development_guide.xml" id="code_style">code style</link>
used by nginx.
Sometimes, there is no clear rule; in such cases
examine how existing nginx sources are formatted and mimic this style.
Changes will more likely be accepted if style corresponds to the surrounding
code.
</para>
<para>
<link url="https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits">Commit</link>
the changes in your nginx GitHub fork.
Please ensure that the specified
<link url="https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git">e-mail</link>
address and real name of the author are correct.
</para>
<para>
The commit message should have a single-line synopsis followed by verbose
description after an empty line.
Limit the subject and commit message body lines to 72 characters.
The resulting commit can be obtained using the
<literal>git show</literal> command:
<programlisting>
commit 067d766f210ee914b750d79d9284cbf8801058f3
Author: Zoey <[email protected]>
Date: Sun Apr 5 11:31:15 2026 +0200
Fix $request_port and $is_request_port in subrequests
Closes #1247.
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 0c46106db..53ddf39bb 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2453,6 +2453,8 @@ ngx_http_subrequest(ngx_http_request_t *r,
sr->method = NGX_HTTP_GET;
sr->http_version = r->http_version;
+ sr->port = r->port;
+
sr->request_line = r->request_line;
sr->uri = *uri;
</programlisting>
</para>
</section>
<section id="before_submitting" name="Before Submitting">
<para>
Several points are worth to consider before submitting changes:
<list type="bullet">
<listitem>
The proposed changes should work properly on a wide range of
<link doc="../index.xml" id="tested_os_and_platforms">supported
platforms</link>.
</listitem>
<listitem>
Try to make it clear why the suggested change is needed, and provide a use
case, if possible.
</listitem>
<listitem>
Passing your changes through the test suite is a good way to ensure
that they do not cause a regression.
The <link url="https://github.com/nginx/nginx-tests">repository</link> with
tests can be cloned with the following command:
<programlisting>
git clone https://github.com/nginx/nginx-tests.git
</programlisting>
</listitem>
</list>
</para>
</section>
<section id="submitting_changes" name="Submitting Changes">
<para>
The proposed changes should be submitted from your fork to
<link url="https://github.com/nginx/nginx">nginx repository</link>
as a
<link url="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork">pull request</link>.
</para>
</section>
<section id="website" name="Website">
<para>
GitHub is used to store the sources for this website.
The <link url="https://www.github.com/nginx/nginx.org">repository</link>
can be cloned with the following command:
<programlisting>
git clone https://github.com/nginx/nginx.org.git
</programlisting>
Documentation changes should be submitted from your fork
as a pull request.
</para>
</section>
<section id="license" name="License">
<para>
Submitting changes implies granting project a permission to use it under
an appropriate <link url="../../LICENSE">license</link>.
</para>
</section>
</article>