We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e62e5df commit 4fa1cc7Copy full SHA for 4fa1cc7
router.go
@@ -232,7 +232,7 @@ func (r *Router) DELETE(path string, handle Handle) {
232
// frequently used, non-standardized or custom methods (e.g. for internal
233
// communication with a proxy).
234
func (r *Router) Handle(method, path string, handle Handle) {
235
- if path[0] != '/' {
+ if len(path) < 1 || path[0] != '/' {
236
panic("path must begin with '/' in path '" + path + "'")
237
}
238
0 commit comments