Make the WebDAV bridge port a setting - #9
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PORTindnc_webdav.pywas 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.json→DNCKIT_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_PORTreads 8008 with no overrides; the bridge reports 80 against adnc_config.jsoncarrying that value.