Closed Bug 1244725 Opened 4 years ago Closed 4 years ago
Tools: Show text of a HTTP response for video live streaming content types
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0 Build ID: 20160118030338 Steps to reproduce: 1. Go to a site that uses HTTP Live Streaming or MPEG-DASH to stream video. 2. Open Network Monitor and look at the text metadata the server is sending. In case of HTTP Live streaming, these are m3u8 playlists in text format. In case of MPEG-DASH, it's an XML with the video/vnd.mpeg.dash.mpd content type. Actual results: Although the data are text or XML, NetMonitor shows them as base64-encoded binary blobs. Expected results: The data are shown as text, or color-highlighted XML.
Added a proposed patch: - add several content type mappings - to either txt or xml - enable HTML mode for the vnd.mpeg.dash.mpd content type - this triggers color highlighting I'll need advice on how to create a mochitest for this. I know how to add new content types and responses to the sjs_content-type-test-server.sjs, but how do I check that the right result was displayed inside the CodeMirror view? Is there any existing test that does something similar?
(In reply to Jarda Snajdr [:jsnajdr] from comment #2) > I'll need advice on how to create a mochitest for this. I know how to add > new content types and responses to the sjs_content-type-test-server.sjs, but > how do I check that the right result was displayed inside the CodeMirror > view? Is there any existing test that does something similar? Victor do you have any tips for the test? Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=cbb63483adee Honza
Flags: needinfo?(odvarko) → needinfo?(vporof)
Added a test that verifies that the source editor contains the right text of the response and is in the right mode. Inspired heavily by browser_net_large-response.js and browser_net_content-type.js. For what I know, the patch is now complete.
Attachment #8726167 - Flags: review?(odvarko)
Attachment #8714316 - Attachment is obsolete: true
The patch looks good to me. Here is a try push before r+ https://treeherder.mozilla.org/#/jobs?repo=try&revision=c45327d70f82 Honza
Comment on attachment 8726167 [details] [diff] [review] DevTools: Show text of a HTTP response for video live streaming content types The try push looks good. I've been talking to :Tomcat and we can safely ignore the Win failure (running on AWS spot machines). Related failures are now starred. You can land the patch. Honza
Attachment #8726167 - Flags: review?(odvarko) → review+
The official mime type for DASH MPD manifests is application/dash+xml, I think "video/vnd.mpeg.dash.mpd" was just a proposal.
(In reply to Alex from comment #10) > The official mime type for DASH MPD manifests is application/dash+xml, I > think "video/vnd.mpeg.dash.mpd" was just a proposal. The "video/vnd.mpeg.dash.mpd" type is however widely used - e.g., in YouTube live streams. I can add application/dash+xml in a follow-up patch. But there are probably dozens of other not-so-common MIME types that are text or XML, but are shown as binary in Firefox's netmonitor.
You need to log in before you can comment on or make changes to this bug.