Closed Bug 1244725 Opened 4 years ago Closed 4 years ago

DevTools: Show text of a HTTP response for video live streaming content types

Categories

(DevTools :: Netmonitor, defect)

46 Branch
defect
Not set

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: jsnajdr, Assigned: jsnajdr)

Details

Attachments

(1 file, 1 obsolete file)

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?
Component: Untriaged → Developer Tools: Netmonitor
Flags: needinfo?(odvarko)
(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)
See browser_net_large-response.js
Flags: 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
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+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8bedab78c870
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
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.
Assignee: nobody → jsnajdr
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.