Skip to content

Commit

Permalink
Merge pull request #58 from ploxiln/prep_release_270
Browse files Browse the repository at this point in the history
prepare release 2.7.0
  • Loading branch information
ploxiln authored May 27, 2020
2 parents ca6193b + 5894166 commit 6a4dd45
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestRequestUnparsedResponseUsingAccessTokenParameterFailedResponse(t *testi
func TestRequestUnparsedResponseUsingHeaders(t *testing.T) {
backend := httptest.NewServer(http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" && r.Header["Auth"][0] == "my_token" {
if r.URL.Path == "/" && r.Header.Get("Auth") == "my_token" {
w.WriteHeader(200)
w.Write([]byte("some payload"))
} else {
Expand Down
3 changes: 2 additions & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ func extractClientIP(req *http.Request, header string) string {

func redirectToHTTPS(h http.Handler, httpsAddr string) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.TLS == nil && strings.ToLower(r.Header.Get("X-Forwarded-Proto")) != "https" {
proto := strings.ToLower(r.Header.Get("X-Forwarded-Proto"))
if ((r.TLS == nil && proto != "https") || (r.TLS != nil && proto == "http")) && r.URL.Path != "/ping" {
url := *r.URL
host := strings.Split(r.Host, ":")[0]
if !strings.HasSuffix(httpsAddr, ":443") {
Expand Down
2 changes: 1 addition & 1 deletion providers/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (p *GitHubProvider) hasOrgAndTeam(accessToken string) (bool, error) {
}
}

matches := pattern.FindStringSubmatch(resp.Header["Link"][0])
matches := pattern.FindStringSubmatch(resp.Header.Get("Link"))
if len(matches) == 0 {
break
}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

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

0 comments on commit 6a4dd45

Please sign in to comment.