Previously Request and Response had redundant fields for
Referer, UserAgent, and cookies which caused confusion and
bugs. It also didn't allow us to expand the package over
time, since the way to access fields would be in the Headers
one day and promoted to a field the next day. That would be
hard to gofix, especially with code ranging over Headers.
After a discussion on the mail package's design with a similar
problem, we've designed to make the Headers be the source of
truth and add accessors instead.
Request:
change: Referer -> Referer()
change: UserAgent -> UserAgent()
change: Cookie -> Cookies()
new: Cookie(name) *Cookie
new: AddCookie(*Cookie)
Response:
change: Cookie -> Cookies()
Cookie:
new: String() string
R=rsc
CC=golang-dev
https://golang.org/cl/4620049
Attributes without value are commen in html and the xml
parser will accept them in non-strict mode and use the
attribute name as value. Thus parsing <p nowrap> as
<p norwar="nowrap">.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4601053
It was always a weird interface but I didn't know what I
was doing at the time. rsc questioned me about it then
but didn't press on it during review. Then adg bugged me
about it too recently.
So clean it up. It parallels the Writer struct too.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4602063
Correct a few error messages (libcgo -> runtime/cgo)
and delete old nacl_386.c file too.
Fixes#1657.
R=iant
CC=golang-dev
https://golang.org/cl/4603057
I don't think we've discussed this API enough.
««« original CL description
bike/shed: new package.
It comes up often enough that it's time to provide
the utility of a standard package.
R=r, mirtchovski, adg, rsc, n13m3y3r, ality, go.peter.90, lstoakes, iant, jan.mercl, bsiegert, robert.hencke, rogpeppe, befelemepeseveze, kevlar
CC=golang-dev
https://golang.org/cl/4557047
»»»
R=dsymonds, bradfitz, gri
CC=golang-dev
https://golang.org/cl/4576065
of accesses via a FileSystem interface.
Preparation for appengine version which gets its files
via a snapshot or zip file and uses a corresponding
FileSystem implementation.
R=rsc, r
CC=golang-dev
https://golang.org/cl/4572065
Still TODO: parsing optimizations
make_perl_groups.pl is copied with minimal modifications
(just to generate Go syntax instead of C++) from RE2.
Google Inc is "The RE2 Author" of that file and is one of
the Go Authors, so copyright changed to the Go Authors instead.
R=sam.thorogood, r, fvbommel, robert.hencke
CC=golang-dev
https://golang.org/cl/4612041
The "elf.h" header changes involve only comments, the released
Plan 9 C preprocessing function does not cope with multiline
comments following the #define keyword. All multiline comments
have been moved to the line above the associated definition.
Sigh! Fixing the Plan 9 compiler is not an option.
<time.h> does not exist in the Plan 9 Native library. I have
moved it from src/cmd/ld/pe.h to include/u.h. RSC correctly points
out that this copy of <u.h> is not the one used to compile the
Go release on Plan 9 platforms.
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4574042
.o files are commonly found in default ignore lists by
source management tools, including dpkg-source, bzr, etc.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4568078
The ptrace syscall remains gutted on darwin, but usable. This
also makes the syscall addition process reproducible on darwin
instead of relying on a file path in rsc's home directory.
I've also removed an override of $PATH in env.bash that made
tooling harder.
R=rsc, dave, r
CC=golang-dev
https://golang.org/cl/4517147
Create a new spdy.Error type that includes the enumerated error type and
the associated stream id (0 if not associated with a specific stream).
This will let users handle errors differently (RST_STREAM vs GOAWAY).
R=bradfitz, rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/4532131