File tree 1 file changed +16
-4
lines changed
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -185,13 +185,25 @@ impl Encoding for HostName {
185
185
return ip. encode ( writer) ;
186
186
}
187
187
#[ cfg( feature = "dns" ) ]
188
- HostName :: Dns ( name) => name. to_string ( ) ,
188
+ HostName :: Dns ( name) => {
189
+ DOMAIN . encode ( writer) ?;
190
+ name. to_string ( )
191
+ } ,
189
192
#[ cfg( feature = "tor" ) ]
190
- HostName :: Tor ( addr) => addr. to_string ( ) ,
193
+ HostName :: Tor ( addr) => {
194
+ DOMAIN . encode ( writer) ?;
195
+ addr. to_string ( )
196
+ } ,
191
197
#[ cfg( feature = "i2p" ) ]
192
- HostName :: I2p ( addr) => addr. to_string ( ) ,
198
+ HostName :: I2p ( addr) => {
199
+ DOMAIN . encode ( writer) ?;
200
+ addr. to_string ( )
201
+ } ,
193
202
#[ cfg( feature = "nym" ) ]
194
- HostName :: Nym ( addr) => addr. to_string ( ) ,
203
+ HostName :: Nym ( addr) => {
204
+ DOMAIN . encode ( writer) ?;
205
+ addr. to_string ( )
206
+ } ,
195
207
_ => return Err ( EncodingError :: AddrNotSupported ) ,
196
208
} ;
197
209
let len =
You can’t perform that action at this time.
0 commit comments