From 78af8b68cfe4222057100911c50d52f3719b47d9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 13 Dec 2020 12:31:14 +0100 Subject: URL-SYNTAX: add default port numbers and IDNA details Closes #6316 --- docs/URL-SYNTAX.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/URL-SYNTAX.md b/docs/URL-SYNTAX.md index f724f75f8..d8fcc9255 100644 --- a/docs/URL-SYNTAX.md +++ b/docs/URL-SYNTAX.md @@ -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 -- cgit v1.2.1