Skip to content

Commit

Permalink
Merge pull request #7 from andrewzeneski/master
Browse files Browse the repository at this point in the history
updates for r60
  • Loading branch information
paulosuzart committed Sep 8, 2011
2 parents 44ca6e4 + 1819fdb commit aab2e73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions http.go
@@ -1,11 +1,11 @@
package main


import (
"http"
"os"
"log"
"encoding/base64"
"url"
)

const (
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions master.go
Expand Up @@ -14,7 +14,7 @@ import (
"netchan"
"flag"
"time"
"template"
"old/template"
)

var (
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions util.go
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"
"time"
"template"
"old/template"
"fmt"
"io"
"strconv"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit aab2e73

Please sign in to comment.