mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	set status_code before response (#513)
This commit is contained in:
		
							parent
							
								
									a5d8df7382
								
							
						
					
					
						commit
						c3dd24482e
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -20,8 +20,8 @@ module Kemal | |||
|     private def call_exception_with_status_code(context : HTTP::Server::Context, exception : Exception, status_code : Int32) | ||||
|       if !Kemal.config.error_handlers.empty? && Kemal.config.error_handlers.has_key?(status_code) | ||||
|         context.response.content_type = "text/html" unless context.response.headers.has_key?("Content-Type") | ||||
|         context.response.print Kemal.config.error_handlers[status_code].call(context, exception) | ||||
|         context.response.status_code = status_code | ||||
|         context.response.print Kemal.config.error_handlers[status_code].call(context, exception) | ||||
|         context | ||||
|       end | ||||
|     end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue