fix for bad header value
Go tool brought in changes that properly implement: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 merged in here: https://go-review.googlesource.com/#/c/23229/ This surfaced a bad http header value in our tests. Change-Id: I2c507bb4c92b060c78a7909600649dae2d22515d
This commit is contained in:
parent
1bceefffb0
commit
b1d8ad5a6f
@ -650,7 +650,7 @@ func TestRoundTrip(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Failed to parse response body: %v", err)
|
t.Fatalf("Failed to parse response body: %v", err)
|
||||||
}
|
}
|
||||||
tok := strings.Trim(string(bs), "new token: ")
|
tok := strings.TrimSpace(strings.Trim(string(bs), "new token: "))
|
||||||
|
|
||||||
u = fmt.Sprintf("%s/foo", ts.URL)
|
u = fmt.Sprintf("%s/foo", ts.URL)
|
||||||
body := strings.NewReader(`{"repo": "https://s.mcquay.me/sm/vain"}`)
|
body := strings.NewReader(`{"repo": "https://s.mcquay.me/sm/vain"}`)
|
||||||
@ -742,7 +742,7 @@ func TestForgot(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Failed to parse response body: %v", err)
|
t.Fatalf("Failed to parse response body: %v", err)
|
||||||
}
|
}
|
||||||
recTok := strings.Trim(string(ft), "new token: ")
|
recTok := strings.TrimSpace(strings.Trim(string(ft), "new token: "))
|
||||||
|
|
||||||
if iniTok == recTok {
|
if iniTok == recTok {
|
||||||
t.Fatalf("tokens should not be the same; old token %s, new token %s", iniTok, recTok)
|
t.Fatalf("tokens should not be the same; old token %s, new token %s", iniTok, recTok)
|
||||||
|
Loading…
Reference in New Issue
Block a user