mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 09:35:27 +08:00 
			
		
		
		
	Can't set StatusCode after Response has started (#200)
This commit is contained in:
		
				
					committed by
					
						
						Tom Pallister
					
				
			
			
				
	
			
			
			
						parent
						
							31f526d3cd
						
					
				
				
					commit
					0784954971
				
			@@ -85,7 +85,10 @@ namespace Ocelot.Errors.Middleware
 | 
			
		||||
 | 
			
		||||
        private void SetInternalServerErrorOnResponse(HttpContext context)
 | 
			
		||||
        {
 | 
			
		||||
            context.Response.StatusCode = 500;
 | 
			
		||||
            if (!context.Response.HasStarted)
 | 
			
		||||
            {
 | 
			
		||||
                context.Response.StatusCode = 500;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private string CreateMessage(HttpContext context, Exception e)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user