Permalink
Browse files

Fixing strings.Split calls for weekly release

  • Loading branch information...
paulbellamy committed Jul 9, 2011
1 parent 9983ca2 commit 14249454b8b322e10ed3a2a77cb55a66b8d12ff1
Showing with 2 additions and 2 deletions.
  1. +1 −1 sessions.go
  2. +1 −1 sessions_test.go
View
@@ -49,7 +49,7 @@ func decode64(value string) (result string) {
func decodeCookie(value, secret string) (cookie map[string]interface{}) {
cookie = make(map[string]interface{})
- split := strings.Split(string(value), "--", 2)
+ split := strings.Split(string(value), "--")
if len(split) < 2 {
return cookie
View
@@ -63,7 +63,7 @@ func TestSessions(t *testing.T) {
t.Error("Expected the Set-Cookie header to be set")
}
- unparsed := strings.Split(strings.Split(cookie, "=", 2)[1], ";", 2)[0]
+ unparsed := strings.Split(strings.Split(cookie, "=")[1], ";")[0]
value := decodeCookie(unparsed, "my_secret")
expected_value := map[string]interface{}{"counter": int(2)}
if len(value) != len(expected_value) {

0 comments on commit 1424945

Please sign in to comment.