Index: samesite.py ================================================================== --- samesite.py +++ samesite.py @@ -109,11 +109,11 @@ 'Host', 'If-Modified-Since', 'If-Unmodified-Since', 'Referer', 'Ua-Cpu', 'User-Agent', 'Via', - 'X-Forwarded-For', 'X-Last-Hr', 'X-Last-Http-Status-Code', 'X-Removed', 'X-Real-Ip', 'X-Retry-Count', + 'X-Forwarded-For', 'X-Last-HR', 'X-Last-HTTP-Status-Code', 'X-Old-UID', 'X-Removed', 'X-Real-IP', 'X-Retry-Count', ]) print('===============[ {} request ]==='.format(self.command)) for header in self.headers: @@ -189,11 +189,11 @@ if reload or recheck: try: request = config_host['proto'] + '://' + config_host['root'] + self.path my_headers = {} - for header in ('Cache-Control', 'Cookie', 'Referer', 'User-Agent'): + for header in ('Accept', 'Cache-Control', 'Cookie', 'Referer', 'User-Agent'): if header in self.headers: my_headers[header] = self.headers[header] needed = None if self.command not in ('HEAD'): @@ -337,11 +337,11 @@ index.sync() except urllib.error.HTTPError as error: # in case of error we don't need to do anything actually, # if file download stalls or fails the file would not be moved to it's location - print(error) + print(error, repr(my_headers)) print(index[my_path_b]) if not os.access(file_name, os.R_OK) and os.access(temp_name, os.R_OK) and '_parts' in index[my_path_b] and index[my_path_b]['_parts'] == spacemap.SpaceMap(): # just moving