|
@@ -1810,7 +1810,6 @@ func TestServer_Response_TransferEncoding_chunked(t *testing.T) {
|
|
|
{":status", "200"},
|
|
{":status", "200"},
|
|
|
{"content-type", "text/plain; charset=utf-8"},
|
|
{"content-type", "text/plain; charset=utf-8"},
|
|
|
{"content-length", strconv.Itoa(len(msg))},
|
|
{"content-length", strconv.Itoa(len(msg))},
|
|
|
- {"x-content-type-options", "nosniff"},
|
|
|
|
|
}
|
|
}
|
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
|
t.Errorf("Got headers %v; want %v", goth, wanth)
|
|
t.Errorf("Got headers %v; want %v", goth, wanth)
|
|
@@ -1999,7 +1998,6 @@ func TestServer_Response_LargeWrite(t *testing.T) {
|
|
|
wanth := [][2]string{
|
|
wanth := [][2]string{
|
|
|
{":status", "200"},
|
|
{":status", "200"},
|
|
|
{"content-type", "text/plain; charset=utf-8"}, // sniffed
|
|
{"content-type", "text/plain; charset=utf-8"}, // sniffed
|
|
|
- {"x-content-type-options", "nosniff"},
|
|
|
|
|
// and no content-length
|
|
// and no content-length
|
|
|
}
|
|
}
|
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
@@ -2214,7 +2212,6 @@ func TestServer_Response_Automatic100Continue(t *testing.T) {
|
|
|
{":status", "200"},
|
|
{":status", "200"},
|
|
|
{"content-type", "text/plain; charset=utf-8"},
|
|
{"content-type", "text/plain; charset=utf-8"},
|
|
|
{"content-length", strconv.Itoa(len(reply))},
|
|
{"content-length", strconv.Itoa(len(reply))},
|
|
|
- {"x-content-type-options", "nosniff"},
|
|
|
|
|
}
|
|
}
|
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
|
t.Errorf("Got headers %v; want %v", goth, wanth)
|
|
t.Errorf("Got headers %v; want %v", goth, wanth)
|
|
@@ -2938,7 +2935,6 @@ func testServerWritesTrailers(t *testing.T, withFlush bool) {
|
|
|
{"trailer", "Transfer-Encoding, Content-Length, Trailer"},
|
|
{"trailer", "Transfer-Encoding, Content-Length, Trailer"},
|
|
|
{"content-type", "text/plain; charset=utf-8"},
|
|
{"content-type", "text/plain; charset=utf-8"},
|
|
|
{"content-length", "5"},
|
|
{"content-length", "5"},
|
|
|
- {"x-content-type-options", "nosniff"},
|
|
|
|
|
}
|
|
}
|
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
if !reflect.DeepEqual(goth, wanth) {
|
|
|
t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth)
|
|
t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth)
|
|
@@ -3330,7 +3326,6 @@ func TestServerNoDuplicateContentType(t *testing.T) {
|
|
|
{":status", "200"},
|
|
{":status", "200"},
|
|
|
{"content-type", ""},
|
|
{"content-type", ""},
|
|
|
{"content-length", "41"},
|
|
{"content-length", "41"},
|
|
|
- {"x-content-type-options", "nosniff"},
|
|
|
|
|
}
|
|
}
|
|
|
if !reflect.DeepEqual(headers, want) {
|
|
if !reflect.DeepEqual(headers, want) {
|
|
|
t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want)
|
|
t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want)
|