Skip to content

Fix WebDAV startup with WsgiDAV 4.x middleware stack#1

Merged
TheZupZup merged 1 commit intomainfrom
codex/fix-runtime-errors-in-code
Apr 11, 2026
Merged

Fix WebDAV startup with WsgiDAV 4.x middleware stack#1
TheZupZup merged 1 commit intomainfrom
codex/fix-runtime-errors-in-code

Conversation

@TheZupZup
Copy link
Copy Markdown
Owner

Motivation

  • The WebDAV server failed to start with a ModuleNotFoundError because wsgidav.debug_filter.WsgiDavDebugFilter is not present in some WsgiDAV 4.x installs, causing startup to crash.

Description

  • Remove the unconditional wsgidav.debug_filter.WsgiDavDebugFilter entry from the middleware_stack in nexanote/sync/server.py and import importlib.util.
  • Add a runtime check using importlib.util.find_spec("wsgidav.debug_filter") to prepend the debug middleware only when the module is available, preserving debug support when installed.
  • This change keeps the WebDAV startup compatible across WsgiDAV versions while retaining debug middleware if present.

Testing

  • Ran timeout 8s python main.py and verified the backend starts without the previous ModuleNotFoundError (startup completed within the timeout).
  • Ran pytest -q and observed 64 passed (all tests succeeded).

Codex Task

@TheZupZup TheZupZup merged commit c5de492 into main Apr 11, 2026
1 check passed
@TheZupZup TheZupZup deleted the codex/fix-runtime-errors-in-code branch April 13, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant