mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-10-31 10:37:22 -04:00 
			
		
		
		
	Switched http compression from gzip to deflate
This commit is contained in:
		
							parent
							
								
									debc4e6ae5
								
							
						
					
					
						commit
						ecfffba494
					
				| @ -39,7 +39,7 @@ namespace MediaBrowser.ApiInteraction | ||||
| 
 | ||||
|         public BaseClient(HttpClientHandler clientHandler) | ||||
|         { | ||||
|             clientHandler.AutomaticDecompression = DecompressionMethods.GZip; | ||||
|             clientHandler.AutomaticDecompression = DecompressionMethods.Deflate; | ||||
| 
 | ||||
|             HttpClient = new HttpClient(clientHandler); | ||||
|         } | ||||
|  | ||||
| @ -73,7 +73,7 @@ namespace MediaBrowser.Common.Net.Handlers | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public virtual bool GzipResponse | ||||
|         public virtual bool CompressResponse | ||||
|         { | ||||
|             get | ||||
|             { | ||||
| @ -92,11 +92,11 @@ namespace MediaBrowser.Common.Net.Handlers | ||||
| 
 | ||||
|         private void WriteReponse(Stream stream) | ||||
|         { | ||||
|             if (GzipResponse) | ||||
|             if (CompressResponse) | ||||
|             { | ||||
|                 using (GZipStream gzipStream = new GZipStream(stream, CompressionMode.Compress, false)) | ||||
|                 using (DeflateStream compressedStream = new DeflateStream(stream, CompressionLevel.Fastest, false)) | ||||
|                 { | ||||
|                     WriteResponseToOutputStream(gzipStream); | ||||
|                     WriteResponseToOutputStream(compressedStream); | ||||
|                 } | ||||
|             } | ||||
|             else | ||||
|  | ||||
| @ -60,9 +60,9 @@ namespace MediaBrowser.Common.Net | ||||
|             { | ||||
|                 Response.SendChunked = true; | ||||
| 
 | ||||
|                 if (handler.GzipResponse) | ||||
|                 if (handler.CompressResponse) | ||||
|                 { | ||||
|                     Response.AddHeader("Content-Encoding", "gzip"); | ||||
|                     Response.AddHeader("Content-Encoding", "deflate"); | ||||
|                 } | ||||
| 
 | ||||
|                 if (cacheDuration.Ticks > 0) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user