summaryrefslogtreecommitdiff
path: root/src/pkg/http
AgeCommit message (Collapse)AuthorFilesLines
2010-01-06http: avoid header duplication - take struct fields out of Header mapRuss Cox1-2/+12
R=r CC=golang-dev, petar-m http://codereview.appspot.com/183132
2010-01-06Add http.CanonicalPath and tests for it. Remove BUG(rsc) from url.go.Ivan Krasin2-9/+95
R=rsc, imkrasin CC=golang-dev http://codereview.appspot.com/179126 Committer: Russ Cox <rsc@golang.org>
2009-12-15Add basic http authentication support.Ivan Krasin1-0/+11
Fixes issue 407. R=rsc, ajstarks CC=ushakov http://codereview.appspot.com/176076 Committer: Russ Cox <rsc@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer10-611/+611
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 http://codereview.appspot.com/180048
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike2-3/+4
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev http://codereview.appspot.com/163085
2009-11-24Change to container/vector interface:Robert Griesemer1-1/+1
- 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 issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-24http: redirect to correct URLRuss Cox1-4/+3
R=r, r1 http://codereview.appspot.com/157154
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox3-9/+9
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-17http: do not crash accessing r.Form if ParseForm failsRuss Cox2-7/+6
Fixes issue 233. R=dsymonds1 http://codereview.appspot.com/154179
2009-11-15http.URLEscape: escape all bytes required by RFC 2396Russ Cox2-8/+10
Fixes issue 125. R=r http://codereview.appspot.com/154143
2009-11-13Created new Conn.Flush() public method so the fd pipeline can be drained ↵David Titarenco1-2/+10
arbitrarily by the user. Commented both flush methods so people know what they are looking at. This is a necessary fix for streaming and long polling HTTP services. Fixes issue 93. R=r, rsc, david.titarenco http://codereview.appspot.com/154099 Committer: Russ Cox <rsc@golang.org>
2009-11-10allow user agent to mention Go.Russ Cox1-2/+1
R=r http://go/go-review/1024046
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer5-20/+20
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 Griesemer9-193/+193
R=rsc, r http://go/go-review/1025029
2009-11-08a nagging inconsistency: capitalization ofRuss Cox6-26/+26
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 Griesemer6-27/+9
- 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-11-04gofmt-ify hash, httpRobert Griesemer4-158/+155
(gofmt will be able to re-align map entries as in http nicely, eventually) R=rsc http://go/go-review/1018055
2009-11-02package net cleanupRuss Cox1-4/+6
added ReadFrom/WriteTo for packet protocols like UDP. simplified the net.Conn interface. added new net.PacketConn interface for packet protocols. implemented proper UDP listener. cleaned up LocalAddr/RemoteAddr methods - cache in netFD. threw away various unused methods. an interface change: introduced net.Addr as a network address interface, to avoid conversion of UDP host:port to string and back for every ReadFrom/WriteTo sequence. another interface change: since signature of Listener.Accept was changing anyway, dropped the middle return value, because it is available as c.RemoteAddr(). (the Accept signature predates the existence of that method.) Dial and Listen still accept strings, but the proto-specific versions DialTCP, ListenUDP, etc. take net.Addr instead. because the generic Dial didn't change and because no one calls Accept directly (only indirectly via the http server), very little code will be affected by these interface changes. design comments welcome. R=p CC=go-dev, r http://go/go-review/1018017
2009-11-01reverse the arguments to io.Copy so the destination is on theRob Pike2-4/+4
left, like an assignment, like strcpy, etc. R=rsc CC=go-dev http://go/go-review/1016011
2009-10-23publish Request.Write (rename from Request.write)Rob Pike2-3/+3
R=rsc CC=go-dev http://go/go-review/1015003
2009-10-21have http server in-line PDF files.Rob Pike1-0/+1
add go course pdf files to doc/ for godoc to serve. fix links to point to those files. R=rsc DELTA=7 (4 added, 0 deleted, 3 changed) OCL=35972 CL=35981
2009-10-19test and fix http redirect handlingRuss Cox2-0/+16
BUG=2197242 R=r DELTA=16 (16 added, 0 deleted, 0 changed) OCL=35878 CL=35882
2009-10-15Trivial documentation fix for func ListenAndServe().Stephen Ma1-0/+1
R=go-dev APPROVED=gri DELTA=1 (1 added, 0 deleted, 0 changed) OCL=35817 CL=35819
2009-10-15typoRob Pike1-1/+1
R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=35743 CL=35762
2009-10-08more lgtm files from gofmtRuss Cox3-91/+91
R=gri OCL=35485 CL=35488
2009-10-06apply gofmt to go, gob, hash, http, image, io, json, logRuss Cox5-131/+127
R=gri DELTA=1359 (138 added, 32 deleted, 1189 changed) OCL=35408 CL=35420
2009-10-03Fixing HTTP POST handling to work with Chrome and Safari.Bill Neubauer2-2/+44
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-30rename the public exvar package to be expvar.Rob Pike1-5/+5
R=rsc DELTA=684 (324 added, 324 deleted, 36 changed) OCL=35161 CL=35163
2009-09-17use buf.String() instead of string(buf.Bytes())Rob Pike1-1/+1
use strings.Buffer instead of bytes.Buffer in some places R=rsc DELTA=40 (0 added, 3 deleted, 37 changed) OCL=34770 CL=34775
2009-09-17unused importsRuss Cox3-7/+1
R=r OCL=34731 CL=34731
2009-09-16rename bytes.Buffer.Data() to bytes.Buffer.Bytes()Rob Pike1-1/+1
R=rsc DELTA=152 (6 added, 0 deleted, 146 changed) OCL=34695 CL=34701
2009-09-15more "declared and not used".Russ Cox6-10/+10
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 Cox2-4/+2
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 Cox1-1/+1
also drop bool arg from ReadString R=r DELTA=45 (13 added, 1 deleted, 31 changed) OCL=33923 CL=33960
2009-08-26add io.LimitReader.Russ Cox1-0/+6
use it to limit data read from http.Request Body R=r DELTA=32 (8 added, 6 deleted, 18 changed) OCL=33899 CL=33916
2009-08-24Wrap kludge text in HTML comments so the text/html output will remain valid ↵David Symonds1-8/+15
HTML. Be more conservative: only mess with text/html and text/plain output. R=rsc APPROVED=rsc DELTA=20 (12 added, 5 deleted, 3 changed) OCL=33806 CL=33812
2009-08-20naming cleanup.Russ Cox1-1/+1
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-19fix spelling that is correct but bothers me anywayRob Pike1-3/+3
R=rsc DELTA=3 (0 added, 0 deleted, 3 changed) OCL=33496 CL=33519
2009-08-12delete forward type declarationsRuss Cox1-2/+0
R=r DELTA=163 (1 added, 149 deleted, 13 changed) OCL=33106 CL=33111
2009-08-12convert non-low-level non-google pkg codeRuss Cox9-91/+10
to whole-package compilation. R=r OCL=33070 CL=33101
2009-08-10remove unnecessary pkg. referencesRuss Cox1-3/+3
R=r DELTA=95 (0 added, 0 deleted, 95 changed) OCL=33012 CL=33012
2009-07-15change HTTP access for RPC.Russ Cox1-32/+40
1. use CONNECT instead of GET. CONNECT has exactly the meaning we want; most of the time people connect to ip:port; we're connecting to /_goRPC_ 2. wait for a successful HTTP response before assuming we are connected to the RPC protocol. this allows better error reporting and also keeps the protocol alternating between speakers, so that the buffering in the HTTP request reader cannot accidentally eat some RPC bytes too. gotest sometimes hangs, but not in HTTP. gotest -match=Unknown hangs every few runs even in a clean client. R=r DELTA=117 (57 added, 44 deleted, 16 changed) OCL=31656 CL=31685
2009-07-06allow conversion to interface typeRuss Cox1-3/+1
when implicit assignment would have been okay. R=ken OCL=31225 CL=31227
2009-06-29bug163 bug164 bug166Russ Cox1-1/+1
R=ken OCL=30889 CL=30889
2009-06-29io.StringBytes -> strings.BytesRuss Cox2-2/+3
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 Symonds2-38/+78
R=rsc APPROVED=rsc DELTA=95 (40 added, 14 deleted, 41 changed) OCL=30727 CL=30784
2009-06-25Change os.Error convention:Russ Cox5-115/+155
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-24style police: parens in if, for, switch, rangeRuss Cox3-12/+9
R=r DELTA=32 (0 added, 3 deleted, 29 changed) OCL=30718 CL=30725
2009-06-24Change strings.Split, bytes.Split to take a maximum substring count argument.David Symonds2-8/+7
R=rsc APPROVED=r DELTA=131 (39 added, 10 deleted, 82 changed) OCL=30669 CL=30723