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

[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:  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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs