瀏覽代碼

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 年之前
父節點
當前提交
327632014e
共有 1 個文件被更改,包括 1 次插入0 次删除
  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)
 		}