Skip to content

fix: server-prefix respects path segment boundaries#322

Merged
miketheman merged 1 commit into
Pylons:mainfrom
miketheman:fix/146-server-prefix-boundary
Jul 4, 2026
Merged

fix: server-prefix respects path segment boundaries#322
miketheman merged 1 commit into
Pylons:mainfrom
miketheman:fix/146-server-prefix-boundary

Conversation

@miketheman

Copy link
Copy Markdown
Collaborator

A server url like /v was being treated as a prefix of any route that merely started with those characters, so /version got mangled into "ersion" and falsely reported as a missing endpoint.

Only strip a prefix when it lands on a real path segment boundary.

Fixes #146

A server url like /v was being treated as a prefix of any route that
merely started with those characters, so /version got mangled into
"ersion" and falsely reported as a missing endpoint.

Only strip a prefix when it lands on a real path segment boundary.

Fixes Pylons#146
@miketheman miketheman requested a review from zupo July 3, 2026 20:54
@miketheman miketheman merged commit 205f412 into Pylons:main Jul 4, 2026
2 checks passed
@miketheman miketheman deleted the fix/146-server-prefix-boundary branch July 4, 2026 10:39
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.

pyramid_openapi3 messes up routes when the server prefix matches

2 participants