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

Re: [tor-bugs] #8605 [Stem]: Autodetect response type in ControlMessage.from_str()



#8605: Autodetect response type in ControlMessage.from_str()
----------------------------+-----------------------------------------------
    Reporter:  atagar       |       Owner:  atagar         
        Type:  enhancement  |      Status:  closed         
    Priority:  normal       |   Milestone:                 
   Component:  Stem         |     Version:                 
  Resolution:  wontfix      |    Keywords:  controller easy
      Parent:               |      Points:                 
Actualpoints:               |  
----------------------------+-----------------------------------------------
Changes (by atagar):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 Hi sreenatha, thanks for looking into this!

 > Unable to find a solid way of identifying other response types(GETINFO,
 GETCONF, MAPADDRESS and SINGLELINE).

 Hmmm, on reflection you're right. Most controller responses won't have a
 type associated with them...

 {{{
 atagar@morrigan:~$ telnet localhost 9051
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 AUTHENTICATE
 250 OK

 GETINFO version
 250-version=0.2.4.10-alpha-dev (git-8be6058d8f31e578)
 250 OK
 }}}

 I'd rather not have from_str() automatically convert a small handful of
 message types but fail for highly common ones like GETINFO and GETCONF.
 Guess we will need to leave the conversion to our callers after all... oh
 well, thanks for investigating it. :)

 Couple nitpicks for the future: thank you for including the ticket url in
 your commit message, but please also use a more descriptive commit message
 (take a look at other commits in our repository for examples). Also, the
 control-spec says that an event's response code is '650'. Simply checking
 that the code starts with a '6' probably wouldn't have been a good idea...

 https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-
 spec.txt#l1216

 Cheers! -Damian

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8605#comment:3>
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