[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #11648 [Tor]: Problem parsing .z-compressed descriptors fetched via DirPort



#11648: Problem parsing .z-compressed descriptors fetched via DirPort
-------------------------+-----------------------
     Reporter:  karsten  |      Owner:
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:
    Component:  Tor      |    Version:
   Resolution:           |   Keywords:  tor-relay
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-----------------------

Comment (by karsten):

 Replying to [comment:2 wfn]:
 > Last mystery comment for now:
 >
 >  1. It seems that zlib header should include the length of the zlib
 image. When sending in multiple chunks, tor is of course unable to provide
 the right length in the header.

 Well, tor could go through chunks twice, once to sum up their lengths and
 write that to the header, and another time to actually send chunks.

 But I don't know the code enough to say if this would solve the problem.

 >  2. (this is the "try this magical pill" part:) does using
 `zlib.decompress(data, 15 + 32)` on python's side help, perchance (can't
 test right now)? (See: http://stackoverflow.com/questions/1838699/how-
 can-i-decompress-a-gzip-stream-with-zlib) (note: this will probably not
 work, because the problem on SE was ~~somewhat~~ actually different; but
 it's probably easy to try out.)

 The magical pill didn't work.

 But here's some more information from `curl -vv`: it seems that tor uses
 "deflate" to compress descriptors.  AFAIK, there's also "zlib" and "gzip",
 which tor doesn't seem to use.  Though Python's zlib should support all of
 them.  Hmm.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11648#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs