Commit b3906673 authored by JessonChan's avatar JessonChan

Merge remote-tracking branch 'upstream/develop' into develop

Conflicts:
	httplib/httplib.go
parents f684de23 35b4022e
...@@ -83,6 +83,9 @@ func newBeegoRequest(url, method string) *BeegoHttpRequest { ...@@ -83,6 +83,9 @@ func newBeegoRequest(url, method string) *BeegoHttpRequest {
var resp http.Response var resp http.Response
req.Method = method req.Method = method
req.Header = http.Header{} req.Header = http.Header{}
req.Proto = "HTTP/1.1"
req.ProtoMajor = 1
req.ProtoMinor = 1
return &BeegoHttpRequest{url, &req, map[string]string{}, map[string]string{}, defaultSetting, &resp, nil} return &BeegoHttpRequest{url, &req, map[string]string{}, map[string]string{}, defaultSetting, &resp, nil}
} }
......
...@@ -106,10 +106,10 @@ func SliceDiff(slice1, slice2 []interface{}) (diffslice []interface{}) { ...@@ -106,10 +106,10 @@ func SliceDiff(slice1, slice2 []interface{}) (diffslice []interface{}) {
return return
} }
// SliceIntersect returns diff slice of slice1 - slice2. // SliceIntersect returns slice that are present in all the slice1 and slice2.
func SliceIntersect(slice1, slice2 []interface{}) (diffslice []interface{}) { func SliceIntersect(slice1, slice2 []interface{}) (diffslice []interface{}) {
for _, v := range slice1 { for _, v := range slice1 {
if !InSliceIface(v, slice2) { if InSliceIface(v, slice2) {
diffslice = append(diffslice, v) diffslice = append(diffslice, v)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment