Permalink
Browse files

Merge pull request #7 from andrewzeneski/master

updates for r60
  • Loading branch information...
paulosuzart committed Sep 8, 2011
2 parents 44ca6e4 + 1819fdb commit aab2e73e1de986bb7f7b03881caf53e0a408bb43
Showing with 7 additions and 8 deletions.
  1. +3 −4 http.go
  2. +2 −2 master.go
  3. +2 −2 util.go
View
@@ -1,11 +1,11 @@
package main
-
import (
"http"
"os"
"log"
"encoding/base64"
+ "url"
)
const (
@@ -90,11 +90,10 @@ func (self *HTTPClient) defaultRequest() (req *http.Request, err os.Error) {
req.ProtoMajor = 1
req.ProtoMinor = 1
if self.cookie.Name != "" && self.cookie.Value != "" {
- req.Cookie = make([]*http.Cookie, 1)
- req.Cookie[0] = &http.Cookie{Name: self.cookie.Name, Value: self.cookie.Value}
+ req.AddCookie(&http.Cookie{Name: self.cookie.Name, Value: self.cookie.Value})
}
- if req.URL, err = http.ParseURL(self.addr); err != nil {
+ if req.URL, err = url.Parse(self.addr); err != nil {
return
}
return
View
@@ -14,7 +14,7 @@ import (
"netchan"
"flag"
"time"
- "template"
+ "old/template"
)
var (
@@ -44,7 +44,7 @@ func produceWorkers(master *Master) (workers []Worker) {
}
createProxyWorkers := func() {
wtype = "Proxy"
- addrs := strings.Split(*workersAddrs, ",", -1)
+ addrs := strings.SplitN(*workersAddrs, ",", -1)
workers = make([]Worker, len(addrs))
for i, addr := range addrs {
//Try to connect
View
@@ -12,7 +12,7 @@ import (
"os"
"strings"
"time"
- "template"
+ "old/template"
"fmt"
"io"
"strconv"
@@ -68,7 +68,7 @@ func parseKV(param *string, separator, errmsg string) (k, v string, err os.Error
if *param == "" {
return
}
- data := strings.Split(*param, separator, 2)
+ data := strings.SplitN(*param, separator, 2)
if len(data) != 2 {
err = os.NewError(errmsg)

0 comments on commit aab2e73

Please sign in to comment.