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

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Mar 29 16:15:08 UTC 2013


#8605: Autodetect response type in ControlMessage.from_str()
-------------------------+--------------------------------------------------
 Reporter:  atagar       |          Owner:  atagar
     Type:  enhancement  |         Status:  new   
 Priority:  normal       |      Milestone:        
Component:  Stem         |        Version:        
 Keywords:               |         Parent:        
   Points:               |   Actualpoints:        
-------------------------+--------------------------------------------------
 Presently the from_str() method provides back a ControlMessage instance,
 which the caller then needs to call convert() on to translate it to the
 appropriate subclass. This is pretty clunky and, when responses have
 prefix headers (like '650 BUILDTIMEOUT_SET') we should be able to detect
 the type on their behalf.

 We should check if convert() is idempotent (ie, calling it twice on a
 control message is safe). If so then we can change the default from_str()
 behavior, but if not we'll need to do something different to preserve
 backward compatibility.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8605>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list