Updating golang dependancies (#4075)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6d62d65b2d
Коммит
2ca0e8f9a0
7
vendor/github.com/gorilla/handlers/.travis.yml
сгенерированный
поставляемый
7
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 ./...
|
||||
|
||||
3
vendor/github.com/gorilla/handlers/cors.go
сгенерированный
поставляемый
3
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)
|
||||
}
|
||||
|
||||
|
||||
18
vendor/github.com/gorilla/handlers/cors_test.go
сгенерированный
поставляемый
18
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())
|
||||
|
||||
Ссылка в новой задаче
Block a user