Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #30262

Closed
Open
Opened Apr 23, 2019 by starlight@starlight

stem.descriptor.remote not handling 'HTTP/1.0 404 Not found' gracefully

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

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#30262