Skip to content

fix(static): preserve matched handler 404s#3043

Open
JSap0914 wants to merge 1 commit into
labstack:masterfrom
JSap0914:fix/2775-preserve-matched-handler-not-found
Open

fix(static): preserve matched handler 404s#3043
JSap0914 wants to merge 1 commit into
labstack:masterfrom
JSap0914:fix/2775-preserve-matched-handler-not-found

Conversation

@JSap0914

@JSap0914 JSap0914 commented Jul 14, 2026

Copy link
Copy Markdown

Fixes #2775

Preserves 404 responses from matched handlers when HTML5 static fallback is enabled, while retaining the index fallback for router misses, including group route-not-found handling.

Verification:

  • go test -race ./middleware -run '^TestStaticHTML5PreservesMatchedHandlerNotFound$' -count=1
  • go test -race ./middleware -run '^TestStatic$/^ok,_when_html5_mode_serve_index_for_any_static_file_that_does_not_exist$' -count=1
  • go test -race ./middleware

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.

Not found error conflict with StaticWithConfig middleware

1 participant