summaryrefslogtreecommitdiff
path: root/src/pkg/http/cookie_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/http/cookie_test.go')
-rw-r--r--src/pkg/http/cookie_test.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/pkg/http/cookie_test.go b/src/pkg/http/cookie_test.go
index 13c9fff4a..02e42226b 100644
--- a/src/pkg/http/cookie_test.go
+++ b/src/pkg/http/cookie_test.go
@@ -11,9 +11,9 @@ import (
"os"
"reflect"
"testing"
+ "time"
)
-
var writeSetCookiesTests = []struct {
Cookies []*Cookie
Raw string
@@ -115,6 +115,19 @@ var readSetCookiesTests = []struct {
Header{"Set-Cookie": {"Cookie-1=v$1"}},
[]*Cookie{&Cookie{Name: "Cookie-1", Value: "v$1", Raw: "Cookie-1=v$1"}},
},
+ {
+ Header{"Set-Cookie": {"NID=99=YsDT5i3E-CXax-; expires=Wed, 23-Nov-2011 01:05:03 GMT; path=/; domain=.google.ch; HttpOnly"}},
+ []*Cookie{&Cookie{
+ Name: "NID",
+ Value: "99=YsDT5i3E-CXax-",
+ Path: "/",
+ Domain: ".google.ch",
+ HttpOnly: true,
+ Expires: time.Time{Year: 2011, Month: 11, Day: 23, Hour: 1, Minute: 5, Second: 3, Weekday: 3, ZoneOffset: 0, Zone: "GMT"},
+ RawExpires: "Wed, 23-Nov-2011 01:05:03 GMT",
+ Raw: "NID=99=YsDT5i3E-CXax-; expires=Wed, 23-Nov-2011 01:05:03 GMT; path=/; domain=.google.ch; HttpOnly",
+ }},
+ },
}
func toJSON(v interface{}) string {