summaryrefslogtreecommitdiff
path: root/src/lib/http/request.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-12-18 22:37:22 -0800
committerRuss Cox <rsc@golang.org>2008-12-18 22:37:22 -0800
commit89995dcecf37b9a21c26783dcf8ab506da237363 (patch)
tree851fad01a87b8fa071ed46fa0985f1857d9e47ca /src/lib/http/request.go
parent924e27f38d133bc7c9978a061b20f950554434ee (diff)
downloadgolang-89995dcecf37b9a21c26783dcf8ab506da237363.tar.gz
convert *[] to [].
R=r OCL=21563 CL=21571
Diffstat (limited to 'src/lib/http/request.go')
-rw-r--r--src/lib/http/request.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/http/request.go b/src/lib/http/request.go
index eea1b3e49..36fa77033 100644
--- a/src/lib/http/request.go
+++ b/src/lib/http/request.go
@@ -45,16 +45,18 @@ export type Request struct {
useragent string;
}
+var NIL []byte // TODO(rsc)
+
// Read a line of bytes (up to \n) from b.
// Give up if the line exceeds MaxLineLength.
// The returned bytes are a pointer into storage in
// the bufio, so they are only valid until the next bufio read.
-func ReadLineBytes(b *bufio.BufRead) (p *[]byte, err *os.Error) {
+func ReadLineBytes(b *bufio.BufRead) (p []byte, err *os.Error) {
if p, err = b.ReadLineSlice('\n'); err != nil {
- return nil, err
+ return NIL, err
}
if len(p) >= MaxLineLength {
- return nil, LineTooLong
+ return NIL, LineTooLong
}
// Chop off trailing white space.
@@ -189,7 +191,7 @@ export func ReadRequest(b *bufio.BufRead) (req *Request, err *os.Error) {
return nil, err
}
- var f *[]string;
+ var f []string;
if f = strings.split(s, " "); len(f) != 3 {
return nil, BadRequest
}