mirror of
				https://github.com/HoneyryderChuck/httpx.git
				synced 2025-11-04 00:01:41 -05:00 
			
		
		
		
	An error arose in decompressing a GZIP body from an HTTP/2 response, where the second-to-last DATA frame actually sent the last meaningful data chunk, and the server emitted an additional empty frame with `end_stream` flag. This error was introduced in the transition to ruby 3 and RBS refactorings, when the gzip inflater closes automatically once all the advertised (in "content-length" header) bytes are successfully decompressed. In the case described above, the empty chunk still dives into the decompressor and passed to the now closed ZLib::Stream, which triggeres an exception. The fix is to halt decompression early in the chain. Response#write already knows how to deal with empty frames, so the control should be passed there. Fixes #112