{"action":"created","issue":{"url":"https://api.github.com/repos/pillarjs/send/issues/97","labels_url":"https://api.github.com/repos/pillarjs/send/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/pillarjs/send/issues/97/comments","events_url":"https://api.github.com/repos/pillarjs/send/issues/97/events","html_url":"https://github.com/pillarjs/send/pull/97","id":127643930,"number":97,"title":"Add defaultType option (default NONE)","user":{"login":"felicienfrancois","id":988144,"avatar_url":"https://avatars.githubusercontent.com/u/988144?v=3","gravatar_id":"","url":"https://api.github.com/users/felicienfrancois","html_url":"https://github.com/felicienfrancois","followers_url":"https://api.github.com/users/felicienfrancois/followers","following_url":"https://api.github.com/users/felicienfrancois/following{/other_user}","gists_url":"https://api.github.com/users/felicienfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/felicienfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felicienfrancois/subscriptions","organizations_url":"https://api.github.com/users/felicienfrancois/orgs","repos_url":"https://api.github.com/users/felicienfrancois/repos","events_url":"https://api.github.com/users/felicienfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/felicienfrancois/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pillarjs/send/labels/needs%20tests","name":"needs tests","color":"e11d21"},{"url":"https://api.github.com/repos/pillarjs/send/labels/pr","name":"pr","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-01-20T09:51:02Z","updated_at":"2016-01-22T13:00:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pillarjs/send/pulls/97","html_url":"https://github.com/pillarjs/send/pull/97","diff_url":"https://github.com/pillarjs/send/pull/97.diff","patch_url":"https://github.com/pillarjs/send/pull/97.patch"},"body":"The default value for the `content-type` header when send failed to\r\nresolve it from file path.\r\nBy default, the `content-type` header is not set.\r\n"},"comment":{"url":"https://api.github.com/repos/pillarjs/send/issues/comments/173914363","html_url":"https://github.com/pillarjs/send/pull/97#issuecomment-173914363","issue_url":"https://api.github.com/repos/pillarjs/send/issues/97","id":173914363,"user":{"login":"felicienfrancois","id":988144,"avatar_url":"https://avatars.githubusercontent.com/u/988144?v=3","gravatar_id":"","url":"https://api.github.com/users/felicienfrancois","html_url":"https://github.com/felicienfrancois","followers_url":"https://api.github.com/users/felicienfrancois/followers","following_url":"https://api.github.com/users/felicienfrancois/following{/other_user}","gists_url":"https://api.github.com/users/felicienfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/felicienfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felicienfrancois/subscriptions","organizations_url":"https://api.github.com/users/felicienfrancois/orgs","repos_url":"https://api.github.com/users/felicienfrancois/repos","events_url":"https://api.github.com/users/felicienfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/felicienfrancois/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T13:00:33Z","updated_at":"2016-01-22T13:00:33Z","body":"I updated this pull request to the master branch with:\r\n1°) Default content-type is now `text/plain` if defaultType is not set\r\n2°) Uses a dedicated mime instance which share mime map data with the shared one but not the default_type\r\n3°) Added tests\r\n\r\n@dougwilson\r\nI'm not sure about the expected behavior for the mime instance.\r\nI \"cloned\" the mime module into a _mime instance which share mime map with the \"global\" one but not share the default_type (which is set to null). This instance is still declared as static and so it should be shared by all instance of send. It is also the one which is exported on send.mime (should it be ?).\r\nThen the defaultType option is stored in each instance of send and is used when the result of _mime.lookup is null."}}