{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/mime/issues/19","repository_url":"https://api.github.com/repos/dart-lang/mime","labels_url":"https://api.github.com/repos/dart-lang/mime/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/mime/issues/19/comments","events_url":"https://api.github.com/repos/dart-lang/mime/issues/19/events","html_url":"https://github.com/dart-lang/mime/pull/19","id":326880448,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwODI0NTMw","number":19,"title":"change the mime type for dart source","user":{"login":"devoncarew","id":1269969,"node_id":"MDQ6VXNlcjEyNjk5Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/1269969?v=4","gravatar_id":"","url":"https://api.github.com/users/devoncarew","html_url":"https://github.com/devoncarew","followers_url":"https://api.github.com/users/devoncarew/followers","following_url":"https://api.github.com/users/devoncarew/following{/other_user}","gists_url":"https://api.github.com/users/devoncarew/gists{/gist_id}","starred_url":"https://api.github.com/users/devoncarew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devoncarew/subscriptions","organizations_url":"https://api.github.com/users/devoncarew/orgs","repos_url":"https://api.github.com/users/devoncarew/repos","events_url":"https://api.github.com/users/devoncarew/events{/privacy}","received_events_url":"https://api.github.com/users/devoncarew/received_events","type":"User","site_admin":false},"labels":[{"id":421017840,"node_id":"MDU6TGFiZWw0MjEwMTc4NDA=","url":"https://api.github.com/repos/dart-lang/mime/labels/cla:%20yes","name":"cla: yes","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-28T02:54:42Z","updated_at":"2018-07-20T20:50:32Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/dart-lang/mime/pulls/19","html_url":"https://github.com/dart-lang/mime/pull/19","diff_url":"https://github.com/dart-lang/mime/pull/19.diff","patch_url":"https://github.com/dart-lang/mime/pull/19.patch"},"body":"Change the mime type for Dart source from `application/dart` to `text/x-dart`.\r\n\r\nWhen working on a server serving up a browser based directory listing, I noticed that Dart source files were not displayed by the browser, but instead popped up a dialog asking to save them as binary content. Other source files (css, html, ...) were instead displayed in the browser.\r\n\r\nThe server was reporting `application/dart` as the mime type for Dart files. The `application/` prefix is an indication to the browser that the file has binary content; as the browser didn't understand that binary format, it didn't attempt to display it.\r\n\r\nPreviously we had native processors of Dart files (and the `application/dart` mime type) - Dartium; however executable Dart on the web now just exists in the form of compiled JS files.\r\n\r\nI think we should change the default mime type of Dart files to something that browsers will recognize as text based. From a quick perusal of other languages (and reading https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types), this would be something like `text/x-dart`.\r\n\r\n@kevmoo @anders-sandholm \r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/mime/issues/comments/406723177","html_url":"https://github.com/dart-lang/mime/pull/19#issuecomment-406723177","issue_url":"https://api.github.com/repos/dart-lang/mime/issues/19","id":406723177,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjcyMzE3Nw==","user":{"login":"natebosch","id":7528195,"node_id":"MDQ6VXNlcjc1MjgxOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/7528195?v=4","gravatar_id":"","url":"https://api.github.com/users/natebosch","html_url":"https://github.com/natebosch","followers_url":"https://api.github.com/users/natebosch/followers","following_url":"https://api.github.com/users/natebosch/following{/other_user}","gists_url":"https://api.github.com/users/natebosch/gists{/gist_id}","starred_url":"https://api.github.com/users/natebosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natebosch/subscriptions","organizations_url":"https://api.github.com/users/natebosch/orgs","repos_url":"https://api.github.com/users/natebosch/repos","events_url":"https://api.github.com/users/natebosch/events{/privacy}","received_events_url":"https://api.github.com/users/natebosch/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T20:50:31Z","updated_at":"2018-07-20T20:50:31Z","author_association":"MEMBER","body":"@vsmenon - the min SDK is `2.0.0-dev.20.0` which is past when we supported Dartium so I think this is relatively safe.\r\n\r\nTechnically this could be used on a server which still has a Dartium client, but I think the risk there is low."}}
{"actor":{"display_login":"natebosch"}}