Skip to content

Commit

Permalink
Merge pull request #305 from u5surf/fix_encode_uri
Browse files Browse the repository at this point in the history
fix encodeURI into template
  • Loading branch information
u5surf authored Dec 31, 2024
2 parents 88a3870 + 6fe33b3 commit b57acea
Show file tree
Hide file tree
Showing 3 changed files with 560 additions and 549 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,19 @@ jobs:
working-directory: freenginx
run: |
patch -p1 < /home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check/check_1.20.1+.patch
- name: 'checkout pcre2'
uses: actions/checkout@v3
with:
repository: PCRE2Project/pcre2
path: pcre2
- name: 'autogen pcre2'
working-directory: pcre2
run: |
./autogen.sh
- name: 'build nginx'
working-directory: nginx
run: |
./auto/configure --with-ld-opt="-Wl,-rpath,/usr/local/lib" --without-pcre2 --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/ngx_devel_kit --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/lua-nginx-module --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx-module-vts --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check
./auto/configure --with-ld-opt="-Wl,-rpath,/usr/local/lib" --with-pcre=/home/runner/work/nginx-module-vts/nginx-module-vts/pcre2 --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/ngx_devel_kit --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/lua-nginx-module --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx-module-vts --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check
make
sudo make install
/usr/local/nginx/sbin/nginx -V
Expand All @@ -90,7 +99,7 @@ jobs:
- name: 'build freenginx'
working-directory: freenginx
run: |
./auto/configure --prefix=/usr/local/freenginx --with-ld-opt="-Wl,-rpath,/usr/local/lib" --without-pcre2 --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/ngx_devel_kit --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/lua-nginx-module --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx-module-vts --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check
./auto/configure --prefix=/usr/local/freenginx --with-ld-opt="-Wl,-rpath,/usr/local/lib" --with-pcre=/home/runner/work/nginx-module-vts/nginx-module-vts/pcre2 --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/ngx_devel_kit --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/lua-nginx-module --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx-module-vts --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check
make
sudo make install
/usr/local/freenginx/sbin/nginx -V
Expand Down
6 changes: 3 additions & 3 deletions share/status.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ <h1>
? '<img class="flag flag-{}" />'.format(name.toLowerCase())
: '';

s = '{}{}'.format(aHe('th', '{}{}'.format(flag, name)),
s = '{}{}'.format(aHe('th', encodeURI('{}{}'.format(flag, name))),
aHe('td', [(zone.requestCounter + zone.overCounts['maxIntegerSize'] * zone.overCounts['requestCounter']),
aPs.getValue('{}.{}'.format(uniq, 'requestCounter'), zone.requestCounter), mTh(zone.requestMsec)
]));
Expand Down Expand Up @@ -681,7 +681,7 @@ <h1>

clas = (n++ % 2) ? 'odd' : '';

s = '{}{}'.format(aHe('th', peer.server),
s = '{}{}'.format(aHe('th', encodeURI(peer.server)),
aHe('td', [sTh(peer.backup, peer.down), mTh(peer.responseMsec),
peer.weight, peer.maxFails, peer.failTimeout,
(peer.requestCounter + peer.overCounts['maxIntegerSize'] * peer.overCounts['requestCounter']),
Expand Down Expand Up @@ -722,7 +722,7 @@ <h1>

clas = (n++ % 2) ? 'odd' : '';

s = '{}{}'.format(aHe('th', name),
s = '{}{}'.format(aHe('th', encodeURI(name)),
aHe('td', [bTh(zone.maxSize),
bTh(zone.usedSize),
bTh(zone.outBytes + zone.overCounts['maxIntegerSize'] * zone.overCounts['outBytes']),
Expand Down
Loading

0 comments on commit b57acea

Please sign in to comment.