{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/57000","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/57000/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/57000/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/57000/events","html_url":"https://github.com/rust-lang/rust/issues/57000","id":392870555,"node_id":"MDU6SXNzdWUzOTI4NzA1NTU=","number":57000,"title":"BufReader: appending more data to buffer","user":{"login":"kex103","id":3093240,"node_id":"MDQ6VXNlcjMwOTMyNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/3093240?v=4","gravatar_id":"","url":"https://api.github.com/users/kex103","html_url":"https://github.com/kex103","followers_url":"https://api.github.com/users/kex103/followers","following_url":"https://api.github.com/users/kex103/following{/other_user}","gists_url":"https://api.github.com/users/kex103/gists{/gist_id}","starred_url":"https://api.github.com/users/kex103/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kex103/subscriptions","organizations_url":"https://api.github.com/users/kex103/orgs","repos_url":"https://api.github.com/users/kex103/repos","events_url":"https://api.github.com/users/kex103/events{/privacy}","received_events_url":"https://api.github.com/users/kex103/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-12-20T03:22:55Z","updated_at":"2018-12-21T19:38:06Z","closed_at":"2018-12-21T19:38:06Z","author_association":"NONE","body":"Unless I'm missing something, after a fill_buf call, there isn't a way for me to request the BufReader to read again, appending the results to its internal buffer.\r\n\r\nWould it be feasible to add a function like \"append_buff\" to the BufRead trait? Or to BufReader directly? This would call self.inner.read, passing to it the subslice of the remaining internal buffer self.buf.\r\n\r\nThe motivation for this is to read dynamically sized requests that don't have a message delimiter.\r\nIn my case, by parsing through the request, I can determine if the request is complete or not, but I would not be able to know the full size of the message beforehand."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/449479908","html_url":"https://github.com/rust-lang/rust/issues/57000#issuecomment-449479908","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/57000","id":449479908,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTQ3OTkwOA==","user":{"login":"kex103","id":3093240,"node_id":"MDQ6VXNlcjMwOTMyNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/3093240?v=4","gravatar_id":"","url":"https://api.github.com/users/kex103","html_url":"https://github.com/kex103","followers_url":"https://api.github.com/users/kex103/followers","following_url":"https://api.github.com/users/kex103/following{/other_user}","gists_url":"https://api.github.com/users/kex103/gists{/gist_id}","starred_url":"https://api.github.com/users/kex103/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kex103/subscriptions","organizations_url":"https://api.github.com/users/kex103/orgs","repos_url":"https://api.github.com/users/kex103/repos","events_url":"https://api.github.com/users/kex103/events{/privacy}","received_events_url":"https://api.github.com/users/kex103/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T19:38:06Z","updated_at":"2018-12-21T19:38:06Z","author_association":"NONE","body":"@abonander Thanks, I'll check it out!\r\n\r\nClosing this issue. I realize there are considerations with just adding an \"append_buff\" function, as now I'm getting clipped messages if I hit the end of the buffer."}}
{"actor":{"display_login":"kex103"}}