aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http/request.go
AgeCommit message (Collapse)Author
2010-09-08http: do not cache CanonicalHeaderKeyJukka-Pekka Kekkonen
Fixes #1080. R=rsc CC=golang-dev https://golang.org/cl/2158043
2010-08-23http: doc nitRuss Cox
R=r CC=golang-dev https://golang.org/cl/2013043
2010-08-22http: fix typo in http.Request documentationScott Lawrence
R=golang-dev, r CC=golang-dev https://golang.org/cl/2004044
2010-08-17http: parse query string always, not just in GETRuss Cox
Fixes #985. R=dsymonds, dsymonds1 CC=golang-dev https://golang.org/cl/1963044
2010-07-14mime/multipart and HTTP multipart/form-data supportBrad Fitzpatrick
Somewhat of a work-in-progress (in that MIME is a large spec), but this is functional and enough for discussion and/or code review. In addition to the unit tests, I've tested with curl and Chrome with a variety of test files, making sure the digests of files are unaltered when read via a multipart Part. R=rsc, adg, dsymonds1, agl1 CC=golang-dev https://golang.org/cl/1681049
2010-07-01strings and bytes.Split: make count of 0 mean 0, not infinite.Rob Pike
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev https://golang.org/cl/1704044
2010-06-16http: reply to Expect 100-continue requests automaticallyBrad Fitzpatrick
This CL replaces my earlier https://golang.org/cl/1640044/show in which Continue handling was explicit. Instead, this CL makes it automatic. Reading from Body() is an implicit acknowledgement that the request headers were fine and the body is wanted. In that case, the 100 Continue response is written automatically when the request continues the "Expect: 100-continue" header. R=rsc, adg CC=golang-dev https://golang.org/cl/1610042
2010-06-06http: fix erroneous commentAndrew Gerrand
R=r CC=golang-dev https://golang.org/cl/1539042
2010-05-11http: prevent crash if remote server is not responding with "HTTP/"Robert Griesemer
Fixes #775. R=rsc CC=golang-dev https://golang.org/cl/1180042
2010-03-30simplify various code using new map index ruleRuss Cox
R=r CC=golang-dev https://golang.org/cl/833044
2010-03-16http: add ParseQueryPetar Maymounkov
R=rsc CC=golang-dev https://golang.org/cl/238041
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-25strings: delete Runes, BytesRuss Cox
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev https://golang.org/cl/224062
2010-02-22http: use RawURL in Request.WritePetar Maymounkov
R=rsc CC=golang-dev https://golang.org/cl/217066
2010-02-21http request URI should never be emptyMichael Hoisie
R=rsc, adg CC=golang-dev https://golang.org/cl/217071
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-09http: protect io.WriteString in Request/Response.Write with error checking,Petar Maymounkov
since they were causing a silent program exit (too many EPIPE's). R=rsc CC=golang-dev https://golang.org/cl/204062
2010-02-05http: sort header keys when writing Response or Request to wirePetar Maymounkov
R=rsc CC=golang-dev https://golang.org/cl/203050
2010-02-04http: use ChunkWriter in Request.WritePetar Maymounkov
R=rsc CC=golang-dev https://golang.org/cl/196079
2010-01-29http: increase header line limit, let req.Host override req.URL.HostPetar Maymounkov
Fixes #566. R=rsc CC=golang-dev https://golang.org/cl/194074
2010-01-28Cosmetic bug or compliance fixes in http.Response.Petar Maymounkov
(1) http.Response must close resp.Body after writing. (2) Case when resp.Body != nil and resp.ContentLength = 0 should not be treated as an error in Response.Write, because this is what ReadResponse often returns. (3) Changed body.th to body.hdr for readability. R=rsc CC=golang-dev https://golang.org/cl/194084
2010-01-25http: make Request.Body an io.ReadCloser, matching Response.Body.Petar Maymounkov
R=rsc, rsc1 CC=golang-dev https://golang.org/cl/194046
2010-01-18Significant extension to http.Response, which now adheres to thePetar Maymounkov
usage pattern of http.Request and paves the way to persistent connection handling. R=rsc CC=golang-dev https://golang.org/cl/185043
2010-01-07http: most of a URL shouldn't use URL-escapingRuss Cox
Fixes #502. R=r, hoisie CC=golang-dev https://golang.org/cl/181179
2010-01-06http: avoid header duplication - take struct fields out of Header mapRuss Cox
R=r CC=golang-dev, petar-m https://golang.org/cl/183132
2009-12-151) Change default gofmt default settings forRobert Griesemer
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev https://golang.org/cl/180048
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev https://golang.org/cl/163085
2009-11-24Change to container/vector interface:Robert Griesemer
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes #294. R=rsc, r, r1 https://golang.org/cl/157143
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox
R=r, gri CC=golang-dev https://golang.org/cl/156115
2009-11-17http: do not crash accessing r.Form if ParseForm failsRuss Cox
Fixes #233. R=dsymonds1 https://golang.org/cl/154179
2009-11-10allow user agent to mention Go.Russ Cox
R=r http://go/go-review/1024046
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer
R=rsc, r http://go/go-review/1025029
2009-11-08a nagging inconsistency: capitalization ofRuss Cox
HTML vs Html, URL vs Url, HTTP vs Http, current source is 6:1 in favor of the former, so change instances of the latter. R=r CC=go-dev http://go/go-review/1024026
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-10-23publish Request.Write (rename from Request.write)Rob Pike
R=rsc CC=go-dev http://go/go-review/1015003
2009-10-08more lgtm files from gofmtRuss Cox
R=gri OCL=35485 CL=35488
2009-10-03Fixing HTTP POST handling to work with Chrome and Safari.Bill Neubauer
request.go does not handle Content-Type correctly for the definition of Media Types. http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 R=rsc APPROVED=rsc DELTA=44 (42 added, 0 deleted, 2 changed) OCL=35274 CL=35306
2009-09-15more "declared and not used".Russ Cox
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-08-27remove Line in bufio.ReadLine(Bytes|Slice|String)Russ Cox
also drop bool arg from ReadString R=r DELTA=45 (13 added, 1 deleted, 31 changed) OCL=33923 CL=33960
2009-08-20naming cleanup.Russ Cox
gzip.GzipInflater -> gzip.Inflater gzip.NewGzipInflater -> gzip.NewInflater zlib.NewZlibInflater -> zlib.NewInflater io.ByteReader deleted in favor of bytes.Buffer io.NewByteReader -> bytes.NewBuffer R=r DELTA=52 (3 added, 0 deleted, 49 changed) OCL=33589 CL=33592
2009-08-12convert non-low-level non-google pkg codeRuss Cox
to whole-package compilation. R=r OCL=33070 CL=33101
2009-06-29bug163 bug164 bug166Russ Cox
R=ken OCL=30889 CL=30889
2009-06-29io.StringBytes -> strings.BytesRuss Cox
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-25http Request parsing, plus a convenient accessor.David Symonds
R=rsc APPROVED=rsc DELTA=95 (40 added, 14 deleted, 41 changed) OCL=30727 CL=30784
2009-06-25Change os.Error convention:Russ Cox
echo back context of call in error if likely to be useful. For example, if os.Open("/etc/passwd", os.O_RDONLY) fails with syscall.EPERM, it returns as the os.Error &PathError{ Op: "open", Path: "/etc/passwd" Error: os.EPERM } which formats as open /etc/passwd: permission denied Not converted: datafmt go/... google/... regexp tabwriter template R=r DELTA=1153 (561 added, 156 deleted, 436 changed) OCL=30738 CL=30781
2009-06-24Change strings.Split, bytes.Split to take a maximum substring count argument.David Symonds
R=rsc APPROVED=r DELTA=131 (39 added, 10 deleted, 82 changed) OCL=30669 CL=30723
2009-06-23Fix http client handling of status messages with spaces (e.g. "HTTP/1.1 400 BadDavid Symonds
Request". Use chunked Transfer-Encoding for all POSTs. Implement chunked reading. Change http.Request.write to be HTTP/1.1 only. R=rsc APPROVED=rsc DELTA=178 (123 added, 26 deleted, 29 changed) OCL=30563 CL=30673
2009-06-22Don't prefix Url.Path with a slash in Request.write,David Symonds
because Url.Path already starts with one. Avoid crashing in Request.ParseForm if there is no body. R=rsc APPROVED=rsc DELTA=5 (4 added, 0 deleted, 1 changed) OCL=30552 CL=30607