mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[utils] Fix getheader in urlhandle_detect_ext
Fixes #7049, related to #9440
This commit is contained in:
		| @@ -2031,11 +2031,7 @@ def mimetype2ext(mt): | ||||
|  | ||||
|  | ||||
| def urlhandle_detect_ext(url_handle): | ||||
|     try: | ||||
|         url_handle.headers | ||||
|         getheader = lambda h: url_handle.headers[h] | ||||
|     except AttributeError:  # Python < 3 | ||||
|         getheader = url_handle.info().getheader | ||||
|     getheader = url_handle.headers.get | ||||
|  | ||||
|     cd = getheader('Content-Disposition') | ||||
|     if cd: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yen Chi Hsuan
					Yen Chi Hsuan