Repository: housleyjk/ws-rs (language: rust)

Issue:
Deflate and custom Handler::on_request
I use the Handler.on_request method to authorize users. Unfortunately, this method is overridden  and is no way to use the self on_request. I would use it like there https://github.com/housleyjk/ws-rs/blob/master/src/deflate/extension.rs#L458


Discussion / hints:
The deflate handler should probably delegate out to the wrapped handler's `on_request()`.
That would be nice if deflate handler delegate out to the wrapped handler's `on_request()`

Fix patch:
diff --git a/src/deflate/extension.rs b/src/deflate/extension.rs
index ffbb7bb..10eaefa 100644
--- a/src/deflate/extension.rs
+++ b/src/deflate/extension.rs
@@ -162,7 +162,7 @@ impl<H: Handler> Handler for DeflateHandler<H> {
     }
 
     fn on_request(&mut self, req: &Request) -> Result<Response> {
-        let mut res = try!(Response::from_request(req));
+        let mut res = try!(self.inner.on_request(req));
 
         'ext: for req_ext in try!(req.extensions())
             .iter()


Test patch: