{"action":"created","issue":{"url":"https://api.github.com/repos/koute/cargo-web/issues/53","repository_url":"https://api.github.com/repos/koute/cargo-web","labels_url":"https://api.github.com/repos/koute/cargo-web/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/koute/cargo-web/issues/53/comments","events_url":"https://api.github.com/repos/koute/cargo-web/issues/53/events","html_url":"https://github.com/koute/cargo-web/pull/53","id":290298879,"number":53,"title":"Replace rouille by hyper ","user":{"login":"BenoitZugmeyer","id":61787,"avatar_url":"https://avatars1.githubusercontent.com/u/61787?v=4","gravatar_id":"","url":"https://api.github.com/users/BenoitZugmeyer","html_url":"https://github.com/BenoitZugmeyer","followers_url":"https://api.github.com/users/BenoitZugmeyer/followers","following_url":"https://api.github.com/users/BenoitZugmeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenoitZugmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenoitZugmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenoitZugmeyer/subscriptions","organizations_url":"https://api.github.com/users/BenoitZugmeyer/orgs","repos_url":"https://api.github.com/users/BenoitZugmeyer/repos","events_url":"https://api.github.com/users/BenoitZugmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenoitZugmeyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-01-21T19:37:25Z","updated_at":"2018-02-11T14:24:49Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/koute/cargo-web/pulls/53","html_url":"https://github.com/koute/cargo-web/pull/53","diff_url":"https://github.com/koute/cargo-web/pull/53.diff","patch_url":"https://github.com/koute/cargo-web/pull/53.patch"},"body":"Following #49 discussion, here is a first PR to support `auto-reload` with WebSockets. It only replaces `rouille` by `hyper`.  I tried to keep the same logic as much as possible.\r\n\r\nI initially wanted to use `hyper-staticfile`, but there is some issues:\r\n* it doesn't handle mime types\r\n* it doesn't compile with the latest `futures` crate (because of https://github.com/alexcrichton/futures-rs/issues/228 )\r\n* because it resolves the file location itself, rethinking the whole `cargo-web` artifacts logic would be too much changes for this PR.\r\n\r\nInstead, I based the file streaming on the [Hyper guide](https://hyper.rs/guides/server/response_strategies/#streaming-files). But still, it's a project to consider.\r\n\r\nNote: you are using a different code style than mine (especially on spaces inside brackets and parens). Would you mind commiting a rustfmt configuration file reflecting your tastes so it'd be easier for other folks to contribute? See [this configuration value](https://github.com/rust-lang-nursery/rustfmt/blob/master/Configurations.md#spaces_within_parens_and_brackets) in particular."},"comment":{"url":"https://api.github.com/repos/koute/cargo-web/issues/comments/364755312","html_url":"https://github.com/koute/cargo-web/pull/53#issuecomment-364755312","issue_url":"https://api.github.com/repos/koute/cargo-web/issues/53","id":364755312,"user":{"login":"BenoitZugmeyer","id":61787,"avatar_url":"https://avatars1.githubusercontent.com/u/61787?v=4","gravatar_id":"","url":"https://api.github.com/users/BenoitZugmeyer","html_url":"https://github.com/BenoitZugmeyer","followers_url":"https://api.github.com/users/BenoitZugmeyer/followers","following_url":"https://api.github.com/users/BenoitZugmeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenoitZugmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenoitZugmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenoitZugmeyer/subscriptions","organizations_url":"https://api.github.com/users/BenoitZugmeyer/orgs","repos_url":"https://api.github.com/users/BenoitZugmeyer/repos","events_url":"https://api.github.com/users/BenoitZugmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenoitZugmeyer/received_events","type":"User","site_admin":false},"created_at":"2018-02-11T14:24:49Z","updated_at":"2018-02-11T14:24:49Z","author_association":"NONE","body":"Done!"}}
{"actor":{"display_login":"BenoitZugmeyer"}}