summaryrefslogtreecommitdiff
path: root/src/lib/http
AgeCommit message (Collapse)AuthorFilesLines
2009-06-09mv src/lib to src/pkgRob Pike8-2168/+0
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102
2009-06-08Pad error text for browsers that are too smart.Russ Cox1-0/+50
404 page not found Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. Chrome would ignore this error page if this text weren't here. R=presotto APPROVED=p DELTA=50 (50 added, 0 deleted, 0 changed) OCL=30056 CL=30061
2009-06-08add exec example to http triv.go.Russ Cox1-0/+28
fix darwin interrupt bug (race with SIGCHLD). R=gri DELTA=46 (40 added, 0 deleted, 6 changed) OCL=30052 CL=30057
2009-06-06Basic HTTP POST support.David Symonds2-6/+43
R=rsc APPROVED=rsc DELTA=45 (37 added, 1 deleted, 7 changed) OCL=29964 CL=29990
2009-06-05rebuilt Makefiles for CL 29923Russ Cox1-14/+6
R=r DELTA=761 (1 added, 433 deleted, 327 changed) OCL=29927 CL=29966
2009-06-02Fixes to URL functionality:Steve Newman2-32/+285
- Extend http.URLUnescape to convert '+' to space - Add http.URLEscape - Rename URL.Query to EncodedQuery (and stop decoding it, as decoding this field before separating key/value pairs loses important information) - Report a clean error on incomplete hex escapes - Update existing tests, add new ones APPROVED=rsc DELTA=293 (256 added, 3 deleted, 34 changed) OCL=29685 CL=29759
2009-05-18move ShortWrite error into io so that other packages can use it.Russ Cox1-1/+1
R=r DELTA=15 (7 added, 1 deleted, 7 changed) OCL=28996 CL=28996
2009-05-12Allow http.Redirect to do both temporary (307) and permanent (301) redirects.David Symonds2-16/+27
This also adds a missing 'return' when a malformed URL is passed to it. R=rsc APPROVED=rsc DELTA=30 (13 added, 2 deleted, 15 changed) OCL=28598 CL=28710
2009-05-08implications of stricter type equality:Russ Cox1-1/+1
if both types are named, they must be the same type (arising from the same declaration). R=r,gri DELTA=44 (21 added, 4 deleted, 19 changed) OCL=28436 CL=28577
2009-05-08move things out of sys into os and runtimeRuss Cox1-1/+1
R=r OCL=28569 CL=28573
2009-05-08throw away os._Error.Russ Cox2-12/+15
make some error types in a few packages R=r DELTA=110 (25 added, 46 deleted, 39 changed) OCL=28382 CL=28561
2009-05-08embeddability: change bufio.BufRead to bufio.Reader etc.Rob Pike2-10/+10
R=rsc DELTA=112 (0 added, 4 deleted, 108 changed) OCL=28537 CL=28543
2009-05-08Name change to improve embeddability:Rob Pike1-3/+3
io.Read->io.Reader io.Write,Close,etc.->io.Writer,Closer etc. R=rsc DELTA=190 (0 added, 0 deleted, 190 changed) OCL=28525 CL=28535
2009-05-08minor cleanup, not required by compiler changesRuss Cox1-1/+2
R=r DELTA=14 (1 added, 4 deleted, 9 changed) OCL=28447 CL=28509
2009-05-04Remake exvar package to be more Go-ish.David Symonds1-4/+16
It now exports a Var interface (anyone can export their own custom var types now), so users need to create and manage their own vars and mark them as exportable via the Publish function. They are exposed via /debug/vars. R=r,rsc APPROVED=r DELTA=605 (314 added, 186 deleted, 105 changed) OCL=28143 CL=28239
2009-04-28Add a HTTP handler to the exvar package.David Symonds1-9/+3
R=r APPROVED=r DELTA=20 (11 added, 6 deleted, 3 changed) OCL=27782 CL=27950
2009-04-27Fix the chunked encoding - terminate the chunk with CRLF.Stephen Ma1-1/+11
R=rsc APPROVED=r DELTA=11 (10 added, 0 deleted, 1 changed) OCL=27723 CL=27879
2009-04-19Initial cut at an "exported variables" (exvar) package.David Symonds1-0/+10
This handles integer-valued vars in a singleton struct, and exports functions for incrementing, setting and getting those vars, as well as rendering all the vars in a standard format. Demonstrate the use of the exvar package in the http/triv server. R=dcross,r APPROVED=r DELTA=122 (122 added, 0 deleted, 0 changed) OCL=27617 CL=27622
2009-04-19Readn is a silly name when there's no n. Change to FullRead.Rob Pike1-1/+1
R=gri DELTA=15 (0 added, 0 deleted, 15 changed) OCL=27619 CL=27619
2009-04-17Step 1 of the Big Error Shift: make os.Error an interface and replace ↵Rob Pike4-16/+16
*os.Errors with os.Errors. lib/template updated to use new setup; its clients also updated. Step 2 will make os's error support internally much cleaner. R=rsc OCL=27586 CL=27586
2009-04-16Convert go tree to hierarchical pkg directory:Russ Cox1-11/+15
import ( "vector" -> "container/vector" "ast" -> "go/ast" "sha1" -> "hash/sha1" etc. ) and update Makefiles. Because I did the conversion semi-automatically, I sorted all the import blocks as a post-processing. Some files have therefore changed that didn't strictly need to. Rename local packages to lower case. The upper/lower distinction doesn't work on OS X and complicates the "single-package directories with the same package name as directory name" heuristic used by gobuild and godoc to create the correlation between source and binary locations. Now that we have a plan to avoid globally unique names, the upper/lower is unnecessary. The renamings will cause trouble for a few users, but so will the change in import paths. This way, the two maintenance fixes are rolled into one inconvenience. R=r OCL=27573 CL=27575
2009-04-16regenerate Makefiles.Russ Cox1-10/+19
fix bug in RPC.go (import "RPC" not "rpc.pb") R=r DELTA=483 (261 added, 64 deleted, 158 changed) OCL=27547 CL=27549
2009-04-15code changes for array conversion.Russ Cox1-1/+1
as a reminder, the old conversion was that you could write var arr [10]byte; var slice []byte; slice = arr; but now you have to write slice = &arr; the change eliminates an implicit &, so that the only implicit &s left are in the . operator and in string(arr). also, removed utf8.EncodeRuneToString in favor of string(rune). R=r DELTA=83 (1 added, 23 deleted, 59 changed) OCL=27531 CL=27534
2009-04-15make Location translate relative path to absoluteRuss Cox3-1/+244
(HTTP requires absolute in protocol). add URL tests R=r DELTA=243 (242 added, 0 deleted, 1 changed) OCL=27472 CL=27523
2009-04-14http additionsRuss Cox3-13/+209
file system server add NotFound, Redirect functions method on a string R=r DELTA=212 (199 added, 4 deleted, 9 changed) OCL=27467 CL=27471
2009-04-07add path.Clean and other utilities.Russ Cox1-1/+30
use path.Clean in web server to sanitize URLs. http://triv/go/../../../etc/passwd no longer serves the password file. it redirects to http://triv/etc/passwd which then gets a 404. R=r DELTA=288 (286 added, 0 deleted, 2 changed) OCL=27142 CL=27152
2009-04-02change in negationRobert Griesemer1-1/+1
R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=27061 CL=27061
2009-03-11Rename os.FD to os.File.Russ Cox2-46/+121
Make Fstat, Readdirnames, and Readdir methods on os.File. R=r DELTA=281 (79 added, 3 deleted, 199 changed) OCL=25891 CL=26130
2009-03-11document httpRuss Cox3-21/+80
R=r DELTA=84 (63 added, 4 deleted, 17 changed) OCL=25950 CL=26126
2009-03-03Automated g4 rollback of changelist 25024,Russ Cox2-4/+4
plus significant hand editing. Back to T{x} for composite literals. R=r OCL=25612 CL=25632
2009-02-17drop trailing slashes - missed comment from last reviewRob Pike1-2/+2
TBR=rsc OCL=25135 CL=25135
2009-02-17more fun with triv.go: flags and argumentsRob Pike1-0/+23
R=rsc DELTA=23 (23 added, 0 deleted, 0 changed) OCL=25088 CL=25134
2009-02-13convert composite literals from { } to ( ).Russ Cox2-4/+4
only non-trivial changes are in convlit1.go golden.out R=gri OCL=25019 CL=25024
2009-02-05further pedagogy: a channel that satisfies the HTTP server interfaceRob Pike1-0/+18
R=rsc DELTA=18 (18 added, 0 deleted, 0 changed) OCL=24482 CL=24484
2009-02-05take advantage of methods on funcsRuss Cox1-14/+1
R=r DELTA=14 (0 added, 13 deleted, 1 changed) OCL=24458 CL=24470
2009-02-03fix build. missed this fileRuss Cox1-11/+4
TBR=r OCL=24269 CL=24269
2009-02-03bufio:Russ Cox2-154/+174
* avoid large copies * NewBufRead, NewBufWrite never fail * add BufReadWrite io: * add io.Close http, google/net/rpc: * add, use http.Conn.Hijack R=r DELTA=416 (202 added, 123 deleted, 91 changed) OCL=24153 CL=24238
2009-02-02flesh out http server.Russ Cox5-147/+545
convert to uppercase names. R=r DELTA=613 (460 added, 61 deleted, 92 changed) OCL=24139 CL=24145
2009-01-30update go code tree to new func rules.Russ Cox1-3/+3
R=r DELTA=367 (111 added, 59 deleted, 197 changed) OCL=23957 CL=23960
2009-01-20delete exportRuss Cox4-12/+12
TBR=r OCL=23121 CL=23127
2009-01-16casify miscRuss Cox2-2/+2
R=r DELTA=247 (20 added, 50 deleted, 177 changed) OCL=22951 CL=22955
2009-01-16casify httpRuss Cox3-33/+33
R=r DELTA=33 (0 added, 0 deleted, 33 changed) OCL=22947 CL=22949
2009-01-15convert strconvRuss Cox1-1/+1
R=r DELTA=568 (0 added, 9 deleted, 559 changed) OCL=22898 CL=22901
2009-01-06new new & makeRuss Cox3-5/+5
R=r OCL=22166 CL=22166
2008-12-19change *map to map; *chan to chan; new(T) to new(*T)Russ Cox3-8/+6
fix bugs left over from *[] to [] conversion. TBR=r OCL=21576 CL=21581
2008-12-18convert *[] to [].Russ Cox1-4/+6
R=r OCL=21563 CL=21571
2008-12-10assorted cleanup and fixesRuss Cox1-4/+12
R=r DELTA=209 (109 added, 79 deleted, 21 changed) OCL=20930 CL=20934
2008-11-19refine gobuild: the files must be *_test.go not *test.goRob Pike1-1/+1
this causes complications R=rsc DELTA=1724 (849 added, 856 deleted, 19 changed) OCL=19667 CL=19667
2008-11-19gobuild: add coverage rule, ignore files in package main.Russ Cox1-14/+7
R=r DELTA=55 (41 added, 11 deleted, 3 changed) OCL=19594 CL=19598
2008-11-19leave 6.out around after gotest;Russ Cox1-1/+1
delete it in make clean. R=r DELTA=10 (0 added, 0 deleted, 10 changed) OCL=19542 CL=19581