start: name the requested --http-host/--http-port in the opening line

The first line was hardcoded to http://127.0.0.1:8080 while the flags
were passed through, so ./start.sh --http-host 10.0.28.161 printed
127.0.0.1 although the server bound 10.0.28.161 (its own listening banner
named it).  Both start scripts now parse --http-host/--http-port (space
and = forms, the last value wins like argparse) and echo the effective
address; start.bat parses with shift (%* is unaffected, so the server
still receives every argument).

Bump 3.38.2 (server, pyproject, PWA header, sw simple-v483) and add the
CHANGELOG entry.

Tests: tests/test_pcsc_startup.py pins the parsing/echo (2 new).
1090 Python + 1075 frontend.
This commit is contained in:
catarrh committed 2026-10-25 03:25:22 +03:00
1 parent 393b1098ce
commit 62c5b4e1a9
8 files changed
+81 -9

No files matched your search

+15
View File
@@ -150,6 +150,21 @@ class SourcePins(unittest.TestCase):
# the old "is pcscd running" heuristic is gone
self.assertNotIn('pgrep -x pcscd', src)
def test_the_start_message_names_the_requested_address(self):
src = (Path(m.__file__).parent.parent / 'start.sh').read_text()
self.assertIn('--http-host=*) HTTP_HOST="${arg#*=}"', src)
self.assertIn('--http-port=*) HTTP_PORT="${arg#*=}"', src)
self.assertIn('http://$HTTP_HOST:$HTTP_PORT', src)
# the old hardcoded address is gone (the defaults are named separately)
self.assertNotIn('http://127.0.0.1:8080', src)
def test_the_start_bat_message_names_the_requested_address(self):
src = (Path(m.__file__).parent.parent / 'start.bat').read_text()
self.assertIn('--http-host=', src)
self.assertIn('--http-port=', src)
self.assertIn('%HTTP_HOST%:%HTTP_PORT%', src)
self.assertNotIn('http://127.0.0.1:8080', src)
if __name__ == '__main__':
unittest.main()