Respond to /health and /version by request path rather than the whole url string
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 16.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Request for /health?_t=anything won't return the health info, neither would request for /version if there exists extra query string.
Can we route the /health and /version by request path instead of the whole url string? I can make a pull request if it's okay.
substitute the switch r.URL.String() with switch r.URL.Path:
switch r.URL.Path {
case "/health":
w.Write([]byte("OK\n"))
return
case "/version":
w.Write([]byte(chshare.BuildVersion))
return
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in server/server_handler.go at the switch currently using r.URL.String(). Check how the /health and /version handlers behave when the request includes a query string. Done means both endpoints return their existing health or version responses regardless of extra query parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100