Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Bug 1518759 - register APIHandler against /api/ rather than /api#40

Merged
petemoore merged 1 commit intomasterfrom
bug1518759
Jan 9, 2019
Merged

Bug 1518759 - register APIHandler against /api/ rather than /api#40
petemoore merged 1 commit intomasterfrom
bug1518759

Conversation

@petemoore
Copy link
Copy Markdown
Member

@petemoore petemoore commented Jan 9, 2019

See bug 1518759 for details.

Fallout from #38.

The ServeMux docs state:

ServeMux is an HTTP request multiplexer. It matches the URL of each incoming request against a list of registered patterns and calls the handler for the pattern that most closely matches the URL.

Patterns name fixed, rooted paths, like "/favicon.ico", or rooted subtrees, like "/images/" (note the trailing slash).

Thus, we need to register the APIHandler against /api/ rather than /api (which would only match the fixed url path /api).

@petemoore petemoore requested a review from jhford January 9, 2019 13:18
@petemoore
Copy link
Copy Markdown
Member Author

CC @djmitche @walac @grenade

@petemoore petemoore merged commit de967e4 into master Jan 9, 2019
@petemoore petemoore changed the title Bug 1518759 - registrater APIHandler against /api/ rather than /api Bug 1518759 - register APIHandler against /api/ rather than /api Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants