Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/contributing_changes.xml
1 views
1
<?xml version="1.0"?>
2
3
<!--
4
Copyright (C) Nginx, Inc.
5
-->
6
7
<!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
8
9
<article name="Contributing Changes"
10
link="/en/docs/contributing_changes.html"
11
lang="en"
12
rev="7">
13
14
<section id="getting_sources" name="Getting Sources">
15
16
<para>
17
<link url="https://github.com">GitHub</link> is used
18
to store source code.
19
The <link url="https://github.com/nginx/nginx">repository</link> can be cloned
20
with the following command:
21
<programlisting>
22
git clone https://github.com/nginx/nginx.git
23
</programlisting>
24
</para>
25
26
</section>
27
28
29
<section id="formatting_changes" name="Formatting Changes">
30
31
<para>
32
Changes should be formatted according to the
33
<link doc="../docs/dev/development_guide.xml" id="code_style">code style</link>
34
used by nginx.
35
Sometimes, there is no clear rule; in such cases
36
examine how existing nginx sources are formatted and mimic this style.
37
Changes will more likely be accepted if style corresponds to the surrounding
38
code.
39
</para>
40
41
<para>
42
<link url="https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits">Commit</link>
43
the changes in your nginx GitHub fork.
44
Please ensure that the specified
45
<link url="https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git">e-mail</link>
46
address and real name of the author are correct.
47
</para>
48
49
<para>
50
The commit message should have a single-line synopsis followed by verbose
51
description after an empty line.
52
Limit the subject and commit message body lines to 72 characters.
53
The resulting commit can be obtained using the
54
<literal>git show</literal> command:
55
<programlisting>
56
commit 067d766f210ee914b750d79d9284cbf8801058f3
57
Author: Zoey &lt;[email protected]&gt;
58
Date: Sun Apr 5 11:31:15 2026 +0200
59
60
Fix $request_port and $is_request_port in subrequests
61
62
Closes #1247.
63
64
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
65
index 0c46106db..53ddf39bb 100644
66
--- a/src/http/ngx_http_core_module.c
67
+++ b/src/http/ngx_http_core_module.c
68
@@ -2453,6 +2453,8 @@ ngx_http_subrequest(ngx_http_request_t *r,
69
sr-&gt;method = NGX_HTTP_GET;
70
sr-&gt;http_version = r-&gt;http_version;
71
72
+ sr-&gt;port = r-&gt;port;
73
+
74
sr-&gt;request_line = r-&gt;request_line;
75
sr-&gt;uri = *uri;
76
77
</programlisting>
78
</para>
79
80
</section>
81
82
83
<section id="before_submitting" name="Before Submitting">
84
85
<para>
86
Several points are worth to consider before submitting changes:
87
<list type="bullet">
88
89
<listitem>
90
The proposed changes should work properly on a wide range of
91
<link doc="../index.xml" id="tested_os_and_platforms">supported
92
platforms</link>.
93
</listitem>
94
95
<listitem>
96
Try to make it clear why the suggested change is needed, and provide a use
97
case, if possible.
98
</listitem>
99
100
<listitem>
101
Passing your changes through the test suite is a good way to ensure
102
that they do not cause a regression.
103
The <link url="https://github.com/nginx/nginx-tests">repository</link> with
104
tests can be cloned with the following command:
105
<programlisting>
106
git clone https://github.com/nginx/nginx-tests.git
107
</programlisting>
108
</listitem>
109
110
</list>
111
</para>
112
113
</section>
114
115
116
<section id="submitting_changes" name="Submitting Changes">
117
118
<para>
119
The proposed changes should be submitted from your fork to
120
<link url="https://github.com/nginx/nginx">nginx repository</link>
121
as a
122
<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>.
123
</para>
124
125
</section>
126
127
128
<section id="website" name="Website">
129
130
<para>
131
GitHub is used to store the sources for this website.
132
The <link url="https://www.github.com/nginx/nginx.org">repository</link>
133
can be cloned with the following command:
134
<programlisting>
135
git clone https://github.com/nginx/nginx.org.git
136
</programlisting>
137
Documentation changes should be submitted from your fork
138
as a pull request.
139
</para>
140
141
</section>
142
143
144
<section id="license" name="License">
145
146
<para>
147
Submitting changes implies granting project a permission to use it under
148
an appropriate <link url="../../LICENSE">license</link>.
149
</para>
150
151
</section>
152
153
</article>
154
155