1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

URL-SYNTAX: add default port numbers and IDNA details

Closes #6316
This commit is contained in:
Daniel Stenberg 2020-12-13 12:31:14 +01:00
parent 7ba2577988
commit 78af8b68cf
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -167,15 +167,30 @@ brackets). For example:
http://[2001:1890:1112:1::20]/
### IDNA
If curl was built with International Domain Name (IDN) support, it can also
handle host names using non-ASCII characters.
curl supports IDN host names using the IDNA 2008 standard. This differs from
browsers that follow the WHATWG URL spec, which dictates IDNA 2003 to be used.
The two standards have a huge overlap but differ slightly, perhaps most
famously in how they deal with the German "double s" (`ß`).
## Port number
If there's a colon after the hostname, that should be followed by the port
number to use. 1 - 65535. curl also supports a blank port number field - but
only if the URL starts with a scheme.
If the port number is not specified in the URL, curl will used a default port
based on the provide scheme:
DICT 2628, FTP 21, FTPS 990, GOPHER 70, HTTP 80, HTTPS 443, IMAP 132,
IMAPS 993, LDAP 369, LDAPS 636, MQTT 1883, POP3 110, POP3S 995, RTMP 1935,
RTMPS 443, RTMPT 80, RTSP 554, SCP 22, SFTP 22, SMB 445, SMBS 445, SMTP 25,
SMTPS 465, TELNET 23, TFTP 69
# Scheme specific behaviors
## FTP