diff options
| author | Fuwn <[email protected]> | 2023-03-31 23:55:20 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-03-31 23:55:20 +0000 |
| commit | b4138de0d753eba7d11bb41e45edd42c4784c7c4 (patch) | |
| tree | 3358e7db7f4287bcc7bc2e8deeb22e94bfeaffae /src/router.rs | |
| parent | fix(cargo): response-macros feature flag (diff) | |
| download | windmark-0.2.5.tar.xz windmark-0.2.5.zip | |
feat(router): expose response to post-route callbackv0.2.5
Diffstat (limited to 'src/router.rs')
| -rw-r--r-- | src/router.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/router.rs b/src/router.rs index a89f230..b2c0435 100644 --- a/src/router.rs +++ b/src/router.rs @@ -326,6 +326,7 @@ impl Router { &stream.ssl().peer_certificate(), )); + let peer_certificate = stream.ssl().peer_certificate(); let mut content = if let Ok(ref route) = route { let footers_length = (*self.footers.lock().unwrap()).len(); @@ -364,13 +365,13 @@ impl Router { stream.get_ref(), &url, &route.params, - &stream.ssl().peer_certificate(), + &peer_certificate, )) } else { (*self.error_handler).lock().unwrap()(ErrorContext::new( stream.get_ref(), &url, - &stream.ssl().peer_certificate(), + &peer_certificate, )) }; @@ -390,7 +391,7 @@ impl Router { route.as_ref().map_or(None, |route| Some(&route.params)), &stream.ssl().peer_certificate(), ), - &mut content.content, + &mut content, ); stream |