Skip to content

Commit

Permalink
issue #22: adding HTTP header to automatically close the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
doccaz committed Dec 3, 2021
1 parent a49509a commit c5a1f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vercheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def run(self):
return_data = []
while not valid_response and tries < self.max_tries:
try:
r = self.http.request('GET', 'https://scc.suse.com/api/package_search/packages?product_id=' + str(self.product_id) + '&query=' + urllib.parse.quote(self.package_name), headers={'Accept-Encoding': 'gzip, deflate'})
r = self.http.request('GET', 'https://scc.suse.com/api/package_search/packages?product_id=' + str(self.product_id) + '&query=' + urllib.parse.quote(self.package_name), headers={'Accept-Encoding': 'gzip, deflate', 'Connection':'close'})
except Exception as e:
print('Error while connecting: ' + str(e))
exit(1)
Expand Down

0 comments on commit c5a1f2d

Please sign in to comment.