mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2025-10-24 21:14:00 -07:00 
			
		
		
		
	[PR #9818/3b6efd5c backport][stable-9] cloudflare_dns: handle exhausted response stream in case of http error (#9822)
cloudflare_dns: handle exhausted response stream in case of http error (#9818)
* cloudflare_dns: handle exhausted response stream in case of http error
* Update changelogs/fragments/9818-cloudflare-dns-exhausted-response.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3b6efd5cbc)
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
	
	
This commit is contained in:
		
					parent
					
						
							
								162add04b9
							
						
					
				
			
			
				commit
				
					
						933166b984
					
				
			
		
					 2 changed files with 5 additions and 0 deletions
				
			
		|  | @ -0,0 +1,2 @@ | |||
| bugfixes: | ||||
|   - cloudlare_dns - handle exhausted response stream in case of HTTP errors to show nice error message to the user (https://github.com/ansible-collections/community.general/issues/9782, https://github.com/ansible-collections/community.general/pull/9818). | ||||
|  | @ -511,6 +511,9 @@ class CloudflareAPI(object): | |||
|         try: | ||||
|             content = resp.read() | ||||
|         except AttributeError: | ||||
|             content = None | ||||
| 
 | ||||
|         if not content: | ||||
|             if info['body']: | ||||
|                 content = info['body'] | ||||
|             else: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue