[tor-bugs] #30262 [Core Tor/Stem]: stem.descriptor.remote not handling 'HTTP/1.0 404 Not found' gracefully
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Apr 23 02:17:49 UTC 2019
#30262: stem.descriptor.remote not handling 'HTTP/1.0 404 Not found' gracefully
-----------------------+-------------------------------
Reporter: starlight | Owner: atagar
Type: defect | Status: new
Priority: Medium | Component: Core Tor/Stem
Version: | Severity: Normal
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------+-------------------------------
running (commit 4BE6695A)
{{{
torsocks download_descriptor.py -t server -f
7FE6E24BF6058EA55717C18D34FCD049307D8D2C --orport 171.25.193.9:80
}}}
one receives
{{{
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 560, in _download_descriptors
Downloading server descriptor from 171.25.193.9:80...
self.content, self.reply_headers = _download_from_orport(endpoint,
self.compression, self.resource)
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 973, in _download_from_orport
raise stem.ProtocolError("Response should begin with HTTP success, but
was '%s'" % str_tools._to_unicode(first_line))
stem.ProtocolError: Response should begin with HTTP success, but was
'HTTP/1.0 404 Not found'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 560, in _download_descriptors
self.content, self.reply_headers = _download_from_orport(endpoint,
self.compression, self.resource)
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 973, in _download_from_orport
raise stem.ProtocolError("Response should begin with HTTP success, but
was '%s'" % str_tools._to_unicode(first_line))
stem.ProtocolError: Response should begin with HTTP success, but was
'HTTP/1.0 404 Not found'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tor/Downloads/../download_descriptor.py", line 137, in
<module>
main()
File "/home/tor/Downloads/../download_descriptor.py", line 116, in main
compression = [stem.descriptor.remote.Compression.GZIP]
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 484, in run
return list(self._run(suppress))
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 495, in _run
raise self.error
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 560, in _download_descriptors
self.content, self.reply_headers = _download_from_orport(endpoint,
self.compression, self.resource)
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py",
line 973, in _download_from_orport
raise stem.ProtocolError("Response should begin with HTTP success, but
was '%s'" % str_tools._to_unicode(first_line))
stem.ProtocolError: Response should begin with HTTP success, but was
'HTTP/1.0 404 Not found'
}}}
could be better
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30262>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list