mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Use Flate::Writer.open (#394)
This commit is contained in:
		
							parent
							
								
									ce10f7d31d
								
							
						
					
					
						commit
						902d87c0a7
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -134,7 +134,7 @@ def send_file(env : HTTP::Server::Context, path : String, mime_type : String? = | |||
|       end | ||||
|     elsif request_headers.includes_word?("Accept-Encoding", "deflate") && config.is_a?(Hash) && config["gzip"]? == true && filesize > minsize && Kemal::Utils.zip_types(file_path) | ||||
|       env.response.headers["Content-Encoding"] = "deflate" | ||||
|       Flate::Writer.new(env.response) do |deflate| | ||||
|       Flate::Writer.open(env.response) do |deflate| | ||||
|         IO.copy(file, deflate) | ||||
|       end | ||||
|     else | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue