Revert "Merge pull request #232 from tafia/hyper-proxy"

This reverts commit b09b8620a6, reversing
changes made to abfcd2796e.
This commit is contained in:
Sean McArthur
2018-02-15 12:12:29 -08:00
parent 0203fad886
commit 7db860759d
8 changed files with 517 additions and 67 deletions

View File

@@ -52,11 +52,11 @@ pub fn spawn(txns: Vec<Txn>) -> Server {
let mut n = 0;
while n < expected.len() {
match socket.read(&mut buf[n..]) {
Ok(0) => break,
Err(e) => panic!(e),
Ok(0) | Err(_) => break,
Ok(nread) => n += nread,
}
}
match (::std::str::from_utf8(&expected), ::std::str::from_utf8(&buf[..n])) {
(Ok(expected), Ok(received)) => assert_eq!(expected, received),
_ => assert_eq!(expected, &buf[..n]),