1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-18 11:24:14 +00:00

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

Conflicts:
	httplib/httplib.go
This commit is contained in:
JessonChan 2014-08-22 17:39:57 +08:00
commit b390667374
2 changed files with 5 additions and 2 deletions

View File

@ -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}
}

View File

@ -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)
}
}