File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -512,8 +512,8 @@ def EmptyBuf():
512
512
513
513
def InitializeTCP (host_port ):
514
514
515
- ValidIpAddressRegex = re .compile ("^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])):(\d+)$" )
516
- ValidHostnameRegex = re .compile ("^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])):(\d+)$" )
515
+ ValidIpAddressRegex = re .compile ("^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\ .){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])):(\ \ d+)$" )
516
+ ValidHostnameRegex = re .compile ("^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\ -]*[a-zA-Z0-9])\\ .)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\ -]*[A-Za-z0-9])):(\ \ d+)$" )
517
517
518
518
if ValidIpAddressRegex .search (host_port ) is None and \
519
519
ValidHostnameRegex .search (host_port ) is None :
You can’t perform that action at this time.
0 commit comments