Skip to content

Commit 6a4dd45

Browse files
authored
Merge pull request #58 from ploxiln/prep_release_270
prepare release 2.7.0
2 parents ca6193b + 5894166 commit 6a4dd45

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

api/api_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func TestRequestUnparsedResponseUsingAccessTokenParameterFailedResponse(t *testi
107107
func TestRequestUnparsedResponseUsingHeaders(t *testing.T) {
108108
backend := httptest.NewServer(http.HandlerFunc(
109109
func(w http.ResponseWriter, r *http.Request) {
110-
if r.URL.Path == "/" && r.Header["Auth"][0] == "my_token" {
110+
if r.URL.Path == "/" && r.Header.Get("Auth") == "my_token" {
111111
w.WriteHeader(200)
112112
w.Write([]byte("some payload"))
113113
} else {

http.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ func extractClientIP(req *http.Request, header string) string {
125125

126126
func redirectToHTTPS(h http.Handler, httpsAddr string) http.Handler {
127127
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
128-
if r.TLS == nil && strings.ToLower(r.Header.Get("X-Forwarded-Proto")) != "https" {
128+
proto := strings.ToLower(r.Header.Get("X-Forwarded-Proto"))
129+
if ((r.TLS == nil && proto != "https") || (r.TLS != nil && proto == "http")) && r.URL.Path != "/ping" {
129130
url := *r.URL
130131
host := strings.Split(r.Host, ":")[0]
131132
if !strings.HasSuffix(httpsAddr, ":443") {

providers/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (p *GitHubProvider) hasOrgAndTeam(accessToken string) (bool, error) {
188188
}
189189
}
190190

191-
matches := pattern.FindStringSubmatch(resp.Header["Link"][0])
191+
matches := pattern.FindStringSubmatch(resp.Header.Get("Link"))
192192
if len(matches) == 0 {
193193
break
194194
}

version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package main
22

3-
const VERSION = "2.6.1-beta"
3+
const VERSION = "2.7.0"

0 commit comments

Comments
 (0)