Browse Source

cors: Removed new(?) header from test, resolving failure

"X-Content-Type-Options" was being autoadded, but none of the
test maps took it into account. I saw that "Content-Type" was
also being deleted, so I figured that was the best solution
for this as well.
Matt Keller 10 years ago
parent
commit
327632014e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      pkg/cors/cors_test.go

+ 1 - 0
pkg/cors/cors_test.go

@@ -117,6 +117,7 @@ func TestCORSHandler(t *testing.T) {
 		}
 		// it is set by http package, and there is no need to test it
 		rr.HeaderMap.Del("Content-Type")
+		rr.HeaderMap.Del("X-Content-Type-Options")
 		if !reflect.DeepEqual(rr.HeaderMap, tt.wheader) {
 			t.Errorf("#%d: header = %+v, want %+v", i, rr.HeaderMap, tt.wheader)
 		}