This commit is contained in:
		
							parent
							
								
									e8c5d40bc8
								
							
						
					
					
						commit
						86b7c00adc
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -105,8 +105,13 @@ class HttpFD(FileDownloader):
 | 
				
			||||||
            if has_range:
 | 
					            if has_range:
 | 
				
			||||||
                set_range(request, range_start, range_end)
 | 
					                set_range(request, range_start, range_end)
 | 
				
			||||||
            # Establish connection
 | 
					            # Establish connection
 | 
				
			||||||
 | 
					            try:
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    ctx.data = self.ydl.urlopen(request)
 | 
					                    ctx.data = self.ydl.urlopen(request)
 | 
				
			||||||
 | 
					                except (compat_urllib_error.URLError, ) as err:
 | 
				
			||||||
 | 
					                    if isinstance(err.reason, socket.timeout):
 | 
				
			||||||
 | 
					                        raise RetryDownload(err)
 | 
				
			||||||
 | 
					                    raise err
 | 
				
			||||||
                # When trying to resume, Content-Range HTTP header of response has to be checked
 | 
					                # When trying to resume, Content-Range HTTP header of response has to be checked
 | 
				
			||||||
                # to match the value of requested Range HTTP header. This is due to a webservers
 | 
					                # to match the value of requested Range HTTP header. This is due to a webservers
 | 
				
			||||||
                # that don't support resuming and serve a whole file with no Content-Range
 | 
					                # that don't support resuming and serve a whole file with no Content-Range
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue