mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
(trunk libT) tr_udpParse(): default to port 80 for URLs with a udp scheme and no explicit port.
This commit is contained in:
@@ -1106,10 +1106,11 @@ tr_urlParse( const char * url_in,
|
||||
|
||||
if( !err && !port )
|
||||
{
|
||||
if( !strcmp( protocol, "ftp" ) ) port = 21;
|
||||
if( !strcmp( protocol, "sftp" ) ) port = 22;
|
||||
if( !strcmp( protocol, "http" ) ) port = 80;
|
||||
if( !strcmp( protocol, "https" ) ) port = 443;
|
||||
if( !strcmp( protocol, "udp" ) ) port = 80;
|
||||
else if( !strcmp( protocol, "ftp" ) ) port = 21;
|
||||
else if( !strcmp( protocol, "sftp" ) ) port = 22;
|
||||
else if( !strcmp( protocol, "http" ) ) port = 80;
|
||||
else if( !strcmp( protocol, "https" ) ) port = 443;
|
||||
}
|
||||
|
||||
if( !err )
|
||||
|
||||
Reference in New Issue
Block a user