summaryrefslogtreecommitdiff
path: root/src/lib/http/request.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-04-17 00:08:24 -0700
committerRob Pike <r@golang.org>2009-04-17 00:08:24 -0700
commit3696e3e558a5be76b8af9698ff0e56719e47ec59 (patch)
treec20f34ec6f9dea967a511f65b239c5e8637fec8f /src/lib/http/request.go
parentdf02778ccda228c665179d0ff3dac77217ad6633 (diff)
downloadgolang-3696e3e558a5be76b8af9698ff0e56719e47ec59.tar.gz
Step 1 of the Big Error Shift: make os.Error an interface and replace *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
Diffstat (limited to 'src/lib/http/request.go')
-rw-r--r--src/lib/http/request.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/http/request.go b/src/lib/http/request.go
index a2720ff01..59592add5 100644
--- a/src/lib/http/request.go
+++ b/src/lib/http/request.go
@@ -100,7 +100,7 @@ func (r *Request) ProtoAtLeast(major, minor int) bool {
// 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
}
@@ -119,7 +119,7 @@ func readLineBytes(b *bufio.BufRead) (p []byte, err *os.Error) {
}
// readLineBytes, but convert the bytes into a string.
-func readLine(b *bufio.BufRead) (s string, err *os.Error) {
+func readLine(b *bufio.BufRead) (s string, err os.Error) {
p, e := readLineBytes(b);
if e != nil {
return "", e
@@ -131,7 +131,7 @@ func readLine(b *bufio.BufRead) (s string, err *os.Error) {
// A key/value has the form Key: Value\r\n
// and the Value can continue on multiple lines if each continuation line
// starts with a space.
-func readKeyValue(b *bufio.BufRead) (key, value string, err *os.Error) {
+func readKeyValue(b *bufio.BufRead) (key, value string, err os.Error) {
line, e := readLineBytes(b);
if e != nil {
return "", "", e
@@ -266,7 +266,7 @@ func CanonicalHeaderKey(s string) string {
}
// ReadRequest reads and parses a request from b.
-func ReadRequest(b *bufio.BufRead) (req *Request, err *os.Error) {
+func ReadRequest(b *bufio.BufRead) (req *Request, err os.Error) {
req = new(Request);
// First line: GET /index.html HTTP/1.0