headers: add negative unit tests

This commit is contained in:
aler9
2021-04-26 19:39:20 +02:00
parent 262f283400
commit c1cd32257f
6 changed files with 71 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ func (h *Auth) Read(v base.HeaderValue) error {
i := strings.IndexByte(v0, ' ')
if i < 0 {
return fmt.Errorf("unable to split between method and keys (%v)", v)
return fmt.Errorf("unable to split between method and keys (%v)", v0)
}
method, v0 := v0[:i], v0[i+1:]