Skip to content

Make the WebDAV bridge port a setting - #9

Merged
LucasSKrewer merged 1 commit into
mainfrom
webdav-port-setting
Aug 18, 2026
Merged

Make the WebDAV bridge port a setting#9
LucasSKrewer merged 1 commit into
mainfrom
webdav-port-setting

Conversation

@LucasSKrewer

Copy link
Copy Markdown
Owner

PORT in dnc_webdav.py was a constant with a comment telling you to edit the file for 80. Any install wanting a fixed address carried a local one-line edit, which the next pull silently reverts — the bridge returns on 8008 while mapped drives still point at 80, and nothing reports an error.

It now resolves like every other setting (default → dnc_config.jsonDNCKIT_WEBDAV_PORT). Default stays 8008: 80 is privileged and should be a deliberate choice, not something inherited by whoever clones this.

Tests: 124 passed. config.WEBDAV_PORT reads 8008 with no overrides; the bridge reports 80 against a dnc_config.json carrying that value.

PORT was a constant with a comment telling you to edit the file if you wanted
80. Every install that wanted a fixed address therefore carried a one-line
local edit, and that edit is silently reverted by the next pull. The bridge
then comes back up on 8008 while every mapped drive still points at 80, and
nothing anywhere reports an error - the share just stops answering.

This is not hypothetical: the installation this was written for runs the
bridge on port 80 on an always-on server precisely so the address is fixed,
and that 80 existed only as a hand-edit.

It now resolves like every other setting - default, dnc_config.json, then
DNCKIT_WEBDAV_PORT - so the value lives outside the code and a pull cannot
take it away. The default stays 8008, which is the right value for anyone
cloning this: 80 is privileged and needs admin on Windows, root or
CAP_NET_BIND_SERVICE on Linux, so it should be a deliberate choice rather
than something inherited.

Evidence: the 124 tests still pass; config.WEBDAV_PORT reads 8008 with no
overrides, and the bridge imports and reports PORT 80 against a
dnc_config.json carrying that value.
Not validated: nothing about wsgidav's behaviour changes here - only where
the number comes from.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@LucasSKrewer
LucasSKrewer merged commit eb9ecdf into main Aug 18, 2026
4 checks passed
@LucasSKrewer
LucasSKrewer deleted the webdav-port-setting branch August 18, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant