media type for .har files

951 views
Skip to first unread message

Alex Eagle

unread,
Nov 5, 2014, 1:34:30 PM11/5/14
to http-archive-...@googlegroups.com
Hello,

I'm working on an interoperable format for representing the results of executing tests. See http://google.github.io/rich-test-results/

In order that programs which access the test result data understand all the files produced by the test, we want to include a media type (also commonly called a MIME type or Content-type) for the .har file itself. Relying on the extension and/or content sniffing is error-prone and would leave us with application/octet-stream as the best media type for har files.
(Note I'm not talking about the field inside the .har file which references the Content-type of one of the captured HTTP requests.)

I don't see anything in your pending RFC [1] nor the current media type registry [2]. Has there been any proposal for registering a media type for HAR files?

If not, I intend to create an RFC registering .har along with other test result file types, and I'd like to work with the community on that.

Thanks!
-Alex

Ron Klein

unread,
Nov 6, 2014, 2:30:58 AM11/6/14
to http-archive-...@googlegroups.com
Just a thought:
HAR is, by definition, based on json.
So maybe application/json satisfies?

Alex Eagle

unread,
Nov 6, 2014, 11:12:30 PM11/6/14
to http-archive-...@googlegroups.com
application/json is fine if the viewer wants to see raw har data as a bunch of curly braces. It would be presented no differently from any other data that's represented as JSON.

If the display should look more like the hosted HAR viewer application, then the viewer program needs to know *what kind* of data is in the json.

With XML they have a convention of MIME-types that end with +xml which tells an XML viewer that it could open the file, but also says what kind of data is contained. (https://www.ietf.org/rfc/rfc3023.txt)
so you could imagine
application/har+json
Reply all
Reply to author
Forward
0 new messages