fune/netwerk/test/browser/res_img_for_unknown_decoder^headers^
Eden Chuang 6918ac34a0 Bug 1701868 - Testcase for OpaqueResponseBlocking with type sniffing fail. r=necko-reviewers,dragana
The ORB spec mentions in step 5 that

Wait for 1024 bytes of response or end-of-file, whichever comes first and let bytes be those bytes.

However, this is not guaranteed.

Type sniffing could get fail if the data is not available at the moment, and the response would be reported as Allowed_FailtoGetMIMEType. But in some cases, it should be reported as Allowed_SniffAsImageOrAudioOrVideo.

This patch tries to reproduce the situation above with a browser mochitest by using a compressed(gzip) image file to trigger nsUnknownDecoder.

Differential Revision: https://phabricator.services.mozilla.com/D112698
2021-05-01 20:58:15 +00:00

2 lines
37 B
Text

Content-Type:
Content-Encoding: gzip