Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(29)

Issue 7235065: code review 7235065: exp/cookiejar: remove external storage (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by volker.dobler
Modified:
12 years, 5 months ago
Reviewers:
CC:
nigeltao, golang-dev
Visibility:
Public.

Description

exp/cookiejar: remove external storage This CL removes the external storage of a cookie jar and minimized the exported API as discussed in [1]. [1] https://groups.google.com/d/topic/golang-dev/ygDB3nbir00/discussion Update issue 1960.

Patch Set 1 #

Patch Set 2 : diff -r f6172d444cc0 https://code.google.com/p/go/ #

Patch Set 3 : diff -r f6172d444cc0 https://code.google.com/p/go/ #

Total comments: 14

Patch Set 4 : diff -r 9ff35ff05de6 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 9ff35ff05de6 https://code.google.com/p/go/ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -180 lines) Patch
M src/pkg/exp/cookiejar/jar.go View 1 2 3 4 2 chunks +15 lines, -31 lines 1 comment Download
R src/pkg/exp/cookiejar/storage.go View 1 1 chunk +0 lines, -101 lines 0 comments Download
R src/pkg/exp/cookiejar/storage_test.go View 1 1 chunk +0 lines, -48 lines 0 comments Download

Messages

Total messages: 6
volker.dobler
Hello golang-dev@googlegroups.com, nigeltao@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 5 months ago (2013-01-30 13:00:16 UTC) #1
nigeltao
https://codereview.appspot.com/7235065/diff/4001/src/pkg/exp/cookiejar/jar.go File src/pkg/exp/cookiejar/jar.go (right): https://codereview.appspot.com/7235065/diff/4001/src/pkg/exp/cookiejar/jar.go#newcode42 src/pkg/exp/cookiejar/jar.go:42: type NoPublicSuffixList struct{} I don't see the need for ...
12 years, 5 months ago (2013-01-31 01:22:16 UTC) #2
volker.dobler
PTAL https://codereview.appspot.com/7235065/diff/4001/src/pkg/exp/cookiejar/jar.go File src/pkg/exp/cookiejar/jar.go (right): https://codereview.appspot.com/7235065/diff/4001/src/pkg/exp/cookiejar/jar.go#newcode42 src/pkg/exp/cookiejar/jar.go:42: type NoPublicSuffixList struct{} On 2013/01/31 01:22:16, nigeltao wrote: ...
12 years, 5 months ago (2013-01-31 08:54:31 UTC) #3
nigeltao
Submitting... https://codereview.appspot.com/7235065/diff/4001/src/pkg/exp/cookiejar/jar.go File src/pkg/exp/cookiejar/jar.go (right): https://codereview.appspot.com/7235065/diff/4001/src/pkg/exp/cookiejar/jar.go#newcode78 src/pkg/exp/cookiejar/jar.go:78: type entry struct { On 2013/01/31 08:54:32, volker.dobler ...
12 years, 5 months ago (2013-01-31 23:53:18 UTC) #4
nigeltao
*** Submitted as https://code.google.com/p/go/source/detail?r=f301f988aeba *** exp/cookiejar: remove external storage This CL removes the external storage ...
12 years, 5 months ago (2013-01-31 23:57:15 UTC) #5
volker.dobler
12 years, 5 months ago (2013-02-01 10:21:33 UTC) #6
> I'm not too worried about the bytes. If it turns out to be a problem, we
> can change it. On the other hand, it's easier to write "entry.cookie =
> *cookie" than it is to copy out the fields by hand. The latter is also
> trickier if we ever add fields to the http.Cookie type.
>

It turns out that not that many fields are just copied: Domain and Path
e.g. need heavy processing, MaxAge and Expires are combined into
Expires and the Raw/Unparsed stuff has to be cleared. The only direct
copies are Name, Value, HttpOnly and Secure


>
> Out of curiosity, how do you reduce 144 bytes to 104 bytes?

Combine the three bools to a single uint, replace absolute
LastAccess and Expires by time.Duration relative to Creation
and make Domain a *string.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b