summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/serve.go5
-rw-r--r--gogs.go2
-rw-r--r--models/pull.go4
-rw-r--r--modules/httplib/httplib.go12
-rw-r--r--templates/.VERSION2
5 files changed, 14 insertions, 11 deletions
diff --git a/cmd/serve.go b/cmd/serve.go
index 5f0362744b..b99ab8fcd6 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -5,6 +5,7 @@
package cmd
import (
+ "crypto/tls"
"fmt"
"os"
"os/exec"
@@ -219,7 +220,9 @@ func runServ(c *cli.Context) {
strings.TrimPrefix(task.RefName, "refs/heads/")
log.GitLogger.Trace("Trigger task: %s", reqURL)
- resp, err := httplib.Head(reqURL).Response()
+ resp, err := httplib.Head(reqURL).SetTLSClientConfig(&tls.Config{
+ InsecureSkipVerify: true,
+ }).Response()
if err == nil {
resp.Body.Close()
if resp.StatusCode/100 != 2 {
diff --git a/gogs.go b/gogs.go
index ada0482be5..b80240d861 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.6.18.1025 Beta"
+const APP_VER = "0.6.18.1026 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/models/pull.go b/models/pull.go
index fc8a70345e..55f17fc27c 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -76,7 +76,7 @@ func (pr *PullRequest) AfterSet(colName string, _ xorm.Cell) {
func (pr *PullRequest) getHeadRepo(e Engine) (err error) {
pr.HeadRepo, err = getRepositoryByID(e, pr.HeadRepoID)
if err != nil && !IsErrRepoNotExist(err) {
- return fmt.Errorf("GetRepositoryByID (head): %v", err)
+ return fmt.Errorf("getRepositoryByID(head): %v", err)
}
return nil
}
@@ -92,7 +92,7 @@ func (pr *PullRequest) GetBaseRepo() (err error) {
pr.BaseRepo, err = GetRepositoryByID(pr.BaseRepoID)
if err != nil {
- return fmt.Errorf("GetRepositoryByID (base): %v", err)
+ return fmt.Errorf("GetRepositoryByID(base): %v", err)
}
return nil
}
diff --git a/modules/httplib/httplib.go b/modules/httplib/httplib.go
index a731ddcce2..ff03195c8f 100644
--- a/modules/httplib/httplib.go
+++ b/modules/httplib/httplib.go
@@ -50,7 +50,7 @@ func SetDefaultSetting(setting Settings) {
}
// return *Request with specific method
-func newBeegoRequest(url, method string) *Request {
+func newRequest(url, method string) *Request {
var resp http.Response
req := http.Request{
Method: method,
@@ -64,27 +64,27 @@ func newBeegoRequest(url, method string) *Request {
// Get returns *Request with GET method.
func Get(url string) *Request {
- return newBeegoRequest(url, "GET")
+ return newRequest(url, "GET")
}
// Post returns *Request with POST method.
func Post(url string) *Request {
- return newBeegoRequest(url, "POST")
+ return newRequest(url, "POST")
}
// Put returns *Request with PUT method.
func Put(url string) *Request {
- return newBeegoRequest(url, "PUT")
+ return newRequest(url, "PUT")
}
// Delete returns *Request DELETE method.
func Delete(url string) *Request {
- return newBeegoRequest(url, "DELETE")
+ return newRequest(url, "DELETE")
}
// Head returns *Request with HEAD method.
func Head(url string) *Request {
- return newBeegoRequest(url, "HEAD")
+ return newRequest(url, "HEAD")
}
type Settings struct {
diff --git a/templates/.VERSION b/templates/.VERSION
index 6d506dcbc0..ae01cedbc6 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.6.18.1025 Beta \ No newline at end of file
+0.6.18.1026 Beta \ No newline at end of file