diff options
-rw-r--r-- | data/freedesktop.org.xml.in | 11 | ||||
-rw-r--r-- | tests/mime-detection/har_example.har | 159 | ||||
-rw-r--r-- | tests/mime-detection/list | 1 |
3 files changed, 171 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index a996126..f1243a9 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -3064,6 +3064,17 @@ command to generate the output files. <generic-icon name="text-x-script"/> <glob pattern="*.json5"/> </mime-type> + <mime-type type="application/har+json"> + <comment>HTTP archive</comment> + <sub-class-of type="application/json"/> + <generic-icon name="package-x-generic"/> + <magic priority="10"> + <match type="string" value="{" offset="0"> + <match type="string" value='"log":' offset="1:256"/> + </match> + </magic> + <glob pattern="*.har"/> + </mime-type> <mime-type type="application/jrd+json"> <comment>JRD document</comment> <acronym>JRD</acronym> diff --git a/tests/mime-detection/har_example.har b/tests/mime-detection/har_example.har new file mode 100644 index 0000000..b47f9c7 --- /dev/null +++ b/tests/mime-detection/har_example.har @@ -0,0 +1,159 @@ +{ + "log": { + "version": "1.2", + "creator": { + "name": "Firefox", + "version": "127.0.2" + }, + "browser": { + "name": "Firefox", + "version": "127.0.2" + }, + "pages": [ + { + "id": "page_1", + "pageTimings": { + "onContentLoad": -4181, + "onLoad": 4411 + }, + "startedDateTime": "2024-07-06T20:28:58.381-00:00", + "title": "https://example.com" + } + ], + "entries": [ + { + "startedDateTime": "2024-07-06T20:28:58.381-00:00", + "request": { + "bodySize": 0, + "method": "GET", + "url": "https://example.com", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Host", + "value": "example.com" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" + }, + { + "name": "Accept", + "value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.5" + }, + { + "name": "Accept-Encoding", + "value": "gzip, deflate, br, zstd" + }, + { + "name": "DNT", + "value": "1" + }, + { + "name": "Sec-GPC", + "value": "1" + }, + { + "name": "Connection", + "value": "keep-alive" + }, + { + "name": "Upgrade-Insecure-Requests", + "value": "1" + }, + { + "name": "Sec-Fetch-Dest", + "value": "document" + }, + { + "name": "Sec-Fetch-Mode", + "value": "navigate" + }, + { + "name": "Sec-Fetch-Site", + "value": "none" + }, + { + "name": "Sec-Fetch-User", + "value": "?1" + }, + { + "name": "Priority", + "value": "u=1" + } + ], + "cookies": [], + "queryString": [], + "headersSize": 514 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Sun, 07 Jul 2024 20:29:52 GMT" + }, + { + "name": "Server", + "value": "Apache (Ubuntu)" + }, + { + "name": "Vary", + "value": "Accept-Encoding" + }, + { + "name": "Content-Encoding", + "value": "gzip" + }, + { + "name": "Content-Length", + "value": "1265" + }, + { + "name": "Keep-Alive", + "value": "timeout=5, max=100" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Content-Type", + "value": "text/html;charset=UTF-8" + } + ], + "cookies": [], + "content": { + "mimeType": "text/html; charset=UTF-8", + "size": 10488, + "text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<html>\n <head>\n <title>Example!</title>\n </head>\n <body>\n</body></html>\n" + }, + "redirectURL": "", + "headersSize": 245, + "bodySize": 138 + }, + "cache": {}, + "timings": { + "blocked": -1, + "dns": 520, + "connect": 203, + "ssl": 1642, + "send": 0, + "wait": 292, + "receive": 0 + }, + "time": 2657, + "_securityState": "secure", + "serverIPAddress": "10.0.0.5", + "connection": "443", + "pageref": "page_1" + } + ] + } +} diff --git a/tests/mime-detection/list b/tests/mime-detection/list index 2b825a7..6641574 100644 --- a/tests/mime-detection/list +++ b/tests/mime-detection/list @@ -392,6 +392,7 @@ json-ld-full-iri.jsonld application/ld+json ox schema.json application/schema+json x test.ipynb application/x-ipynb+json test-reordered.ipynb application/x-ipynb+json ox +har_example.har application/har+json test.cs text/x-csharp ox test.dot text/vnd.graphviz x test.vala text/x-vala ox |