fix(gateway): let non-GET requests fall through controlUi routing when basePath is set#32311
Conversation
Greptile SummaryThis PR fixes a 2026.3.1 regression where all POST (and other non-GET/HEAD) requests returned HTTP 405 when Root cause: Fix: The one-line change at Cleanup: The now-dead Test coverage: Existing tests are updated and a new parameterised test covers PUT/DELETE/PATCH/OPTIONS under basePath; the integration test confirms Confidence Score: 5/5
Last reviewed commit: 2474cb6 |
…n basePath is set When controlUiBasePath is set, classifyControlUiRequest returned method-not-allowed (405) for all non-GET/HEAD requests under basePath, blocking plugin webhook handlers (BlueBubbles, Mattermost, etc.) from receiving POST requests. This is a 2026.3.1 regression. Return not-control-ui instead, matching the empty-basePath behavior, so requests fall through to plugin HTTP handlers. Remove the now-dead method-not-allowed type variant, handler branch, and utility function. Closes openclaw#31983 Closes openclaw#32275 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2474cb6 to
9541f36
Compare
|
Landed via temp rebase onto main.
Checking formatting... All matched files use the correct format.
Found 0 warnings and 0 errors.
OK apps/macos/Sources/OpenClaw/HostEnvSecurityPolicy.generated.swift
RUN v4.0.18 /Users/steipete/Projects/clawdbot2 ✓ src/gateway/control-ui-routing.test.ts (6 tests) 2ms Test Files 2 passed (2) Thanks @ademczuk! |
Summary
controlUiBasePathis set (2026.3.1: controlUi HTTP handler blocks all webhook POSTs with 405 #31983, BlueBubbles webhook message delivery broken in 2026.3.1 (regression from 2026.2.26) #32275)classifyControlUiRequestreturnsmethod-not-allowedfor non-GET/HEAD methods under basePath, blocking plugin webhook handlers (BlueBubbles, Mattermost, etc.)not-control-uiinstead (matching the empty-basePath behavior), so requests fall through to plugin HTTP handlersmethod-not-allowedtype variant, handler branch, andrespondMethodNotAllowedutilityTest plan
pnpm vitest run src/gateway/control-ui-routing.test.ts— 6 tests pass (updated + new)pnpm vitest run src/gateway/control-ui.http.test.ts— 18 tests pass (updated)pnpm vitest run src/gateway/gateway-misc.test.ts— 21 tests pass (regression)pnpm tsgo— zero errorspnpm check— passes (no format issues in changed files)🤖 Generated with Claude Code