]> Cypherpunks repositories - gostls13.git/commitdiff
publish Request.Write (rename from Request.write)
authorRob Pike <r@golang.org>
Fri, 23 Oct 2009 21:19:47 +0000 (14:19 -0700)
committerRob Pike <r@golang.org>
Fri, 23 Oct 2009 21:19:47 +0000 (14:19 -0700)
R=rsc
CC=go-dev
http://go/go-review/1015003

src/pkg/http/client.go
src/pkg/http/request.go

index 698c5c7f4fbf72d274d4645e14e76dcf6699f4c2..0b045136b232c96c95d44c53f214c119e43a41ed 100644 (file)
@@ -125,7 +125,7 @@ func send(req *Request) (resp *Response, err os.Error) {
                return nil, err;
        }
 
-       err = req.write(conn);
+       err = req.Write(conn);
        if err != nil {
                conn.Close();
                return nil, err;
index 5319c589cf26a53bd2e234424a04aad9a0b7921c..71c93bb1cff76f8414d3bd83101d2ee74c171158 100644 (file)
@@ -125,7 +125,7 @@ func valueOrDefault(value, def string) string {
 // TODO(rsc): Change default UserAgent before open-source release.
 const defaultUserAgent = "http.Client"
 
-// Write an HTTP/1.1 request -- header and body -- in wire format.
+// Write writes an HTTP/1.1 request -- header and body -- in wire format.
 // This method consults the following fields of req:
 //     Url
 //     Method (defaults to "GET")
@@ -135,7 +135,7 @@ const defaultUserAgent = "http.Client"
 //     Body
 //
 // If Body is present, "Transfer-Encoding: chunked" is forced as a header.
-func (req *Request) write(w io.Writer) os.Error {
+func (req *Request) Write(w io.Writer) os.Error {
        uri := URLEscape(req.Url.Path);
        if req.Url.RawQuery != "" {
                uri += "?" + req.Url.RawQuery;