aboutsummaryrefslogtreecommitdiff
path: root/uri.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2020-06-06 15:57:38 +0200
committerGravatar GitHub <noreply@github.com> 2020-06-06 15:57:38 +0200
commitcc9db3ab20c6ef5409d71959c8f9453f8e70565c (patch)
treeddd8b1e03d892bb89daf8801d725c9638cda8de4 /uri.go
parentMake the ErrNothingRead to be exposed. (#827) (diff)
downloadfasthttp-cc9db3ab20c6ef5409d71959c8f9453f8e70565c.tar.gz
fasthttp-cc9db3ab20c6ef5409d71959c8f9453f8e70565c.tar.bz2
fasthttp-cc9db3ab20c6ef5409d71959c8f9453f8e70565c.zip
Try TravisCI Windows (#828)
* Try TravisCI Windows * prefork is supported on windows with Reuseport=true * Bit longer timeouts for tests
Diffstat (limited to 'uri.go')
-rw-r--r--uri.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/uri.go b/uri.go
index 0e6eb1b..695efe4 100644
--- a/uri.go
+++ b/uri.go
@@ -3,6 +3,7 @@ package fasthttp
import (
"bytes"
"errors"
+ "fmt"
"io"
"sync"
)
@@ -511,7 +512,7 @@ func (u *URI) updateBytes(newURI, buf []byte) []byte {
path := u.Path()
n = bytes.LastIndexByte(path, '/')
if n < 0 {
- panic("BUG: path must contain at least one slash")
+ panic(fmt.Sprintf("BUG: path must contain at least one slash: %s %s", u.Path(), newURI))
}
buf = u.appendSchemeHost(buf[:0])
buf = appendQuotedPath(buf, path[:n+1])