aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http/readrequest_test.go
AgeCommit message (Collapse)Author
2011-11-03net: renamingsRob Pike
This is Go 1 package renaming CL #3. This one merely moves the source; the import strings will be changed after the next weekly release. This one moves pieces into net. http -> net/http http/cgi -> net/http/cgi http/fcgi -> net/http/fcgi http/pprof -> net/http/pprof http/httptest -> net/http/httptest mail -> net/mail rpc -> net/rpc rpc/jsonrpc -> net/rpc/jsonrpc smtp -> net/smtp url -> net/url Also remove rand (now math/rand) from NOTEST - it has a test. The only edits are in Makefiles and deps.bash. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5335048
2011-11-01src/pkg/[a-m]*: gofix -r error -force=errorRuss Cox
R=golang-dev, iant CC=golang-dev https://golang.org/cl/5322051
2011-10-12http: remove Request.RawURLBrad Fitzpatrick
Its purpose is not only undocumented, it's also unknown (to me and Russ, at least) and leads to complexity, bugs and confusion. R=golang-dev, adg, rsc CC=golang-dev https://golang.org/cl/5213043
2011-08-17url: new packageRob Pike
This is just moving the URL code from package http into its own package, which has been planned for a while. Besides clarity, this also breaks a nascent dependency cycle the new template package was about to introduce. Add a gofix module, url, and use it to generate changes outside http and url. Sadness about the churn, gladness about some of the naming improvements. R=dsymonds, bradfitz, rsc, gustavo, r CC=golang-dev https://golang.org/cl/4893043
2011-07-21undo CL 4808044 / 1bd754e69ce7Russ Cox
ServeMux depends on having a URL in order to mux. It might be that the right fix is to have CONNECT handlers just not look at URL. ««« original CL description http: do not parse req.URL for CONNECT CONNECT's argument is not a URL. R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/4808044 »»» TBR=bradfitz CC=golang-dev https://golang.org/cl/4798046
2011-07-21http: do not parse req.URL for CONNECTYasuhiro Matsumoto
CONNECT's argument is not a URL. R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/4808044
2011-06-27http: add FileSystem interface, make FileServer use itBrad Fitzpatrick
Permits serving from virtual filesystems, such as files linked into a binary, or from a zip file. Also adds a gofix for: http.FileServer(root, prefix) -> http.StripPrefix(prefix, http.FileServer(http.Dir(root))) R=r, rsc, gri, adg, dsymonds, r, gri CC=golang-dev https://golang.org/cl/4629047
2011-06-24http: assume ContentLength 0 on GET requestsBrad Fitzpatrick
Incremental step in fix for issue 1999 R=golang-dev, kevlar CC=golang-dev https://golang.org/cl/4667041
2011-06-16http: make Headers be source of truthBrad Fitzpatrick
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
2011-06-08http: change most map[string][]string types to new Values typeBrad Fitzpatrick
This replaces most the map[string][]string usage with a new Values type name, with the usual methods. It also changes client.PostForm to take a Values, rather than a map[string]string, closing a TODO in the code. R=rsc CC=golang-dev https://golang.org/cl/4532123
2011-03-06http: use Header type consistentlyRuss Cox
R=bradfitzgo, dsymonds CC=golang-dev https://golang.org/cl/4244053
2011-02-23http: introduce Header type, implement with net/textprotoPetar Maymounkov
textproto: introduce Header type websocket: use new interface to access Header R=rsc, mattn CC=golang-dev https://golang.org/cl/4185053
2011-01-14http: fix scheme-relative URL parsing; add ParseRequestURLBrad Fitzpatrick
Also adds some tests for Issue 900 which was the reason the current URL parsing is broken. (the previous fix was wrong) R=rsc, adg, dangabrad, bradfitzwork CC=golang-dev https://golang.org/cl/3910042
2010-10-22gofmt -s -w src miscRobert Griesemer
R=r, rsc CC=golang-dev https://golang.org/cl/2662041
2010-09-27http: correct escaping of different parts of URLRuss Cox
Fixes #1076. R=adg CC=golang-dev https://golang.org/cl/2248045
2010-03-16http: change RawPath to mean raw path, not raw everything-after-scheme.Russ Cox
The new meaning is more useful for both websocket and http. R=r, petar-m, ukai CC=golang-dev, madari https://golang.org/cl/582043
2010-03-04gofmt: modified algorithm for alignment of multi-line composite/list entriesRobert Griesemer
- only manual changes are in src/pkg/go/printer/nodes.go - use a heuristic to determine "outliers" such that not entire composites are forced to align with them - improves several places that were not unligned before due too simple heuristic - unalignes some cases that contain "outliers" - gofmt -w src misc Fixes #644. R=rsc, r CC=golang-dev https://golang.org/cl/241041
2010-03-02gofmt: experiment: align values in map composites where possibleRobert Griesemer
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev https://golang.org/cl/223076
2010-02-19http: unified body transfer (read & write) logic in http.Request/Response.Petar Maymounkov
Compliance issue addressed here: POST requests carrying form data are required to use "identity" transfer encoding by common nginx and apache server configurations, e.g. wordpress.com (and many others). So, Request needed to be able to send non-chunked encodings. Thus, Request is extended to support identity and chunked encodings, like Response. Since the Read() and Write() logic are shared by both (and are quite long), it is exported in a separate file transfer.go. R=rsc CC=golang-dev https://golang.org/cl/217048
2010-02-01http: test for ReadReqeustPetar Maymounkov
R=rsc, rsc1 CC=golang-dev https://golang.org/cl/195068