diff --git a/httplib/httplib.go b/httplib/httplib.go index 6531acd2..7969feb6 100644 --- a/httplib/httplib.go +++ b/httplib/httplib.go @@ -83,6 +83,9 @@ func newBeegoRequest(url, method string) *BeegoHttpRequest { var resp http.Response req.Method = method 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} } diff --git a/utils/slice.go b/utils/slice.go index 729f6594..25032b7f 100644 --- a/utils/slice.go +++ b/utils/slice.go @@ -106,10 +106,10 @@ func SliceDiff(slice1, slice2 []interface{}) (diffslice []interface{}) { 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{}) { for _, v := range slice1 { - if !InSliceIface(v, slice2) { + if InSliceIface(v, slice2) { diffslice = append(diffslice, v) } }