summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gorilla/handlers
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-09-23 10:17:51 -0400
committerGitHub <noreply@github.com>2016-09-23 10:17:51 -0400
commit2ca0e8f9a0f9863555a26e984cde15efff9ef8f8 (patch)
treedaae1ee67b14a3d0a84424f2a304885d9e75ce2b /vendor/github.com/gorilla/handlers
parent6d62d65b2dc85855aabea036cbd44f6059e19d13 (diff)
downloadchat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.gz
chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.bz2
chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.zip
Updating golang dependancies (#4075)
Diffstat (limited to 'vendor/github.com/gorilla/handlers')
-rw-r--r--vendor/github.com/gorilla/handlers/.travis.yml7
-rw-r--r--vendor/github.com/gorilla/handlers/cors.go3
-rw-r--r--vendor/github.com/gorilla/handlers/cors_test.go18
3 files changed, 4 insertions, 24 deletions
diff --git a/vendor/github.com/gorilla/handlers/.travis.yml b/vendor/github.com/gorilla/handlers/.travis.yml
index 66435ac0b..783020996 100644
--- a/vendor/github.com/gorilla/handlers/.travis.yml
+++ b/vendor/github.com/gorilla/handlers/.travis.yml
@@ -7,11 +7,12 @@ matrix:
- go: 1.5
- go: 1.6
- go: tip
- allow_failures:
- - go: tip
+
+install:
+ - go get golang.org/x/tools/cmd/vet
script:
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d .)
- - go vet $(go list ./... | grep -v /vendor/)
+ - go tool vet .
- go test -v -race ./...
diff --git a/vendor/github.com/gorilla/handlers/cors.go b/vendor/github.com/gorilla/handlers/cors.go
index 1f92d1ad4..d4229a5d9 100644
--- a/vendor/github.com/gorilla/handlers/cors.go
+++ b/vendor/github.com/gorilla/handlers/cors.go
@@ -112,9 +112,6 @@ func (ch *cors) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set(corsAllowOriginHeader, origin)
- if r.Method == corsOptionMethod {
- return
- }
ch.h.ServeHTTP(w, r)
}
diff --git a/vendor/github.com/gorilla/handlers/cors_test.go b/vendor/github.com/gorilla/handlers/cors_test.go
index c63913eee..ff7eebf48 100644
--- a/vendor/github.com/gorilla/handlers/cors_test.go
+++ b/vendor/github.com/gorilla/handlers/cors_test.go
@@ -104,24 +104,6 @@ func TestCORSHandlerInvalidRequestMethodForPreflightMethodNotAllowed(t *testing.
}
}
-func TestCORSHandlerOptionsRequestMustNotBePassedToNextHandler(t *testing.T) {
- r := newRequest("OPTIONS", "http://www.example.com/")
- r.Header.Set("Origin", r.URL.String())
- r.Header.Set(corsRequestMethodHeader, "GET")
-
- rr := httptest.NewRecorder()
-
- testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- t.Fatal("Options request must not be passed to next handler")
- })
-
- CORS()(testHandler).ServeHTTP(rr, r)
-
- if status := rr.Code; status != http.StatusOK {
- t.Fatalf("bad status: got %v want %v", status, http.StatusOK)
- }
-}
-
func TestCORSHandlerAllowedMethodForPreflight(t *testing.T) {
r := newRequest("OPTIONS", "http://www.example.com/")
r.Header.Set("Origin", r.URL.String())