File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ # Unreleased  
9+ 
10+ ## Fixed  
11+ 
12+ -  ` on_eos `  is now called even for successful responses. ([ #580  ] )
13+ 
14+ [ #580 ] : https://github.com/tower-rs/tower-http/pull/580 
15+ 
816# 0.6.6  
917
1018## Fixed  
Original file line number Diff line number Diff line change 8080                        let  res = res. map ( |body| ResponseBody  { 
8181                            inner :  body, 
8282                            classify_eos :  None , 
83-                             on_eos :  None , 
83+                             on_eos :  on_eos . zip ( Some ( Instant :: now ( ) ) ) , 
8484                            on_body_chunk, 
8585                            on_failure :  Some ( on_failure) , 
8686                            start, 
Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ mod tests {
556556            . await 
557557            . unwrap ( ) ; 
558558        assert_eq ! ( 1 ,  ON_BODY_CHUNK_COUNT . load( Ordering :: SeqCst ) ,  "body chunk" ) ; 
559-         assert_eq ! ( 0 ,  ON_EOS . load( Ordering :: SeqCst ) ,  "eos" ) ; 
559+         assert_eq ! ( 1 ,  ON_EOS . load( Ordering :: SeqCst ) ,  "eos" ) ; 
560560        assert_eq ! ( 0 ,  ON_FAILURE . load( Ordering :: SeqCst ) ,  "failure" ) ; 
561561    } 
562562
@@ -611,7 +611,7 @@ mod tests {
611611            . await 
612612            . unwrap ( ) ; 
613613        assert_eq ! ( 3 ,  ON_BODY_CHUNK_COUNT . load( Ordering :: SeqCst ) ,  "body chunk" ) ; 
614-         assert_eq ! ( 0 ,  ON_EOS . load( Ordering :: SeqCst ) ,  "eos" ) ; 
614+         assert_eq ! ( 1 ,  ON_EOS . load( Ordering :: SeqCst ) ,  "eos" ) ; 
615615        assert_eq ! ( 0 ,  ON_FAILURE . load( Ordering :: SeqCst ) ,  "failure" ) ; 
616616    } 
617617
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments