Artifactspublic-v0

curl

master
ply4 git calls32 ms293 KiB3 cachedprotocol v2
411 lines15 KiBRaw

URL syntax and their use in curl

Specifications

The official "URL syntax" is primarily defined in these two different specifications:

RFC 3986 is the earlier one, and curl has always tried to adhere to that one (since it shipped in January 2005).

The WHATWG URL spec was written later, is incompatible with the RFC 3986 and changes over time.

Variations

URL parsers as implemented in browsers, libraries and tools usually opt to support one of the mentioned specifications. Bugs, differences in interpretations and the moving nature of the WHATWG spec does however make it unlikely that multiple parsers treat URLs the same way.

Security

Due to the inherent differences between URL parser implementations, it is considered a security risk to mix different implementations and assume the same behavior.

For example, if you use one parser to check if a URL uses a good hostname or the correct auth field, and then pass on that same URL to a second parser, there is always a risk it treats the same URL differently. There is no right and wrong in URL land, only differences of opinions.

libcurl offers a separate API to its URL parser for this reason, among others.

Applications may at times find it convenient to allow users to specify URLs for various purposes and that string would then end up fed to curl. Getting a URL from an external untrusted party and using it with curl brings several security concerns:

  1. If you have an application that runs as or in a server application, getting an unfiltered URL can trick your application to access a local resource instead of a remote resource. Protecting yourself against localhost accesses is hard when accepting user provided URLs.

  2. Such custom URLs can access other ports than you planned as port numbers are part of the regular URL format. The combination of a local host and a custom port number can allow external users to play tricks with your local services.

  3. Such a URL might use other schemes than you thought of or planned for.

"RFC 3986 plus"

curl recognizes a URL syntax that we call "RFC 3986 plus". It is grounded on the well established RFC 3986 to make sure previously written command lines and curl using scripts remain working.

curl's URL parser allows a few deviations from the spec in order to inter-operate better with URLs that appear in the wild.

Spaces

A URL provided to curl cannot contain spaces. They need to be provided URL encoded to be accepted in a URL by curl.

An exception to this rule: Location: response headers that indicate to a client where a resource has been redirected to, sometimes contain spaces. This is a violation of RFC 3986 but is fine in the WHATWG spec. curl handles these by re-encoding them to %20.

Non-ASCII

Byte values in a provided URL that are outside of the printable ASCII range are percent-encoded by curl.

Multiple slashes

An absolute URL always starts with a "scheme" followed by a colon. For all the schemes curl supports, the colon must be followed by two slashes according to RFC 3986 but not according to the WHATWG spec - which allows one to infinity amount.

curl allows one, two or three slashes after the colon to still be considered a valid URL.

"scheme-less"

curl supports "URLs" that do not start with a scheme. This is not supported by any of the specifications. This is a shortcut to entering URLs that was supported by browsers early on and has been mimicked by curl.

Based on what the hostname starts with, curl "guesses" what protocol to use:

  • ftp. means FTP
  • dict. means DICT
  • ldap. means LDAP
  • imap. means IMAP
  • smtp. means SMTP
  • pop3. means POP3
  • all other means HTTP

Globbing letters

The curl command line tool supports "globbing" of URLs. It means that you can create ranges and lists using [N-M] and {one,two,three} sequences. The letters used for this ([]{}) are reserved in RFC 3986 and can therefore not legitimately be part of such a URL.

They are however not reserved or special in the WHATWG specification, so globbing can mess up such URLs. Globbing can be turned off for such occasions (using --globoff).

URL syntax details

A URL may consist of the following components - many of them are optional:

[scheme][divider][userinfo][hostname][port number][path][query][fragment]

Each component is separated from the following component with a divider character or string.

For example, this could look like:

https://user:password@www.example.com:80/index.html?foo=bar#top

Scheme

The scheme specifies the protocol to use. A curl build can support a few or many different schemes. You can limit what schemes curl should accept.

curl supports the following schemes on URLs specified to transfer. They are matched case insensitively:

dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, ldap, ldaps, mqtt, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp

When the URL is specified to identify a proxy, curl recognizes the following schemes:

http, https, socks4, socks4a, socks5, socks5h, socks

Userinfo

The userinfo field can be used to set username and password for authentication purposes in this transfer. The use of this field is discouraged since it often means passing around the password in plain text and is thus a security risk.

URLs for IMAP, POP3 and SMTP also support login options as part of the userinfo field. They are provided as a semicolon after the password and then the options.

Hostname

The hostname part of the URL contains the address of the server that you want to connect to. This can be the fully qualified domain name of the server, the local network name of the machine on your network or the IP address of the server or machine represented by either an IPv4 or IPv6 address (within brackets). For example:

https://www.example.com/

https://hostname.example/

https://192.168.0.1/

https://[2001:1890:1112:1::20]/

libcurl rejects hostnames with more than one trailing dot.

Numerical IPv4 addresses

libcurl parses and normalizes everything that appears to be a numerical IPv4 address. Including octal and hexadecimal formats and using one, two, three or four number groups.

This normalizing is done so that curl can properly get documents from HTTP servers (with the correctly formatted address in the Host: header), so that IP based filtering for things like the NO_PROXY environment variable has a higher chance of working correctly, to increase the chances that two URLs can be compared and to allow users to extract and visualize the address in a readable way and to make sure libcurl works identically across different name resolver libraries and function calls.

For a hostname that is only an IPv4 address with a trailing dot, the trailing dot is removed in the normalizing process.

Numerical IPv6 addresses

libcurl allows a zone id to be provided with a numerical IPv6 address, separated with a percent character (%). The percent character may also be percent-encoded as %25. Like this:

http://[fe80::1%25eth0]/

http://[fe80::1%eth0]/

IPvFuture

RFC 3986 documents a numerical IP address format called IPvFuture. libcurl does not recognize this format. Using it causes parse errors.

"localhost"

Starting in curl 7.77.0, curl uses loopback IP addresses for the name localhost: 127.0.0.1 and ::1. It does not resolve the name using the resolver functions.

This is done to make sure the host accessed is truly the localhost - the local machine.

IDNA

If curl was built with International Domain Name (IDN) support, it can also handle hostnames using non-ASCII characters.

When built with libidn2, curl uses the IDNA 2008 standard. This is equivalent to the WHATWG URL spec, but differs from certain browsers that use IDNA 2003 Transitional Processing. The two standards have a huge overlap but differ slightly, perhaps most famously in how they deal with the German "double s".

When WinIDN is used, curl uses IDNA 2003 Transitional Processing, like the rest of Windows.

Port number

If there is 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 uses a default port number based on the provide scheme:

DICT 2628, FTP 21, FTPS 990, GOPHER 70, GOPHERS 70, HTTP 80, HTTPS 443, IMAP 143, IMAPS 993, LDAP 389, LDAPS 636, MQTT 1883, POP3 110, POP3S 995, RTSP 554, SCP 22, SFTP 22, SMTP 25, SMTPS 465, TELNET 23, TFTP 69

Path

By default, libcurl removes sequences of /./ and /../ from the path as per RFC 3986.

libcurl might also normalize percent-encoded sequences to use uppercase hexadecimal letters.

Scheme specific behaviors

FTP

The path part of an FTP request specifies the file to retrieve and from which directory. If the file part is omitted then libcurl downloads the directory listing for the directory specified. If the directory is omitted then the directory listing for the root / home directory is returned.

FTP servers typically put the user in its "home directory" after login, which then differs between users. To explicitly specify the root directory of an FTP server, start the path with double slash // or /%2f (2F is the hexadecimal value of the ASCII code for the slash).

FILE

When a file:// URL is accessed on Windows systems, it can be crafted in a way so that Windows attempts to connect to a (remote) machine when curl wants to read or write such a path.

curl only allows the hostname part of a FILE URL to be one out of these three alternatives: localhost, 127.0.0.1 or blank ("", zero characters). Anything else makes curl fail to parse the URL.

Windows-specific FILE details

curl accepts that the FILE URL's path starts with a "drive letter". That is a single letter a to z followed by a colon or a pipe character (|).

The Windows operating system itself converts some file accesses to perform network accesses over SMB/CIFS, through several different file path patterns. This way, a file:// URL passed to curl might be converted into a network access inadvertently and unknowingly to curl. This is a Windows feature curl cannot control or disable.

IMAP

The path part of an IMAP request not only specifies the mailbox to list or select, but can also be used to check the UIDVALIDITY of the mailbox, to specify the UID, SECTION and PARTIAL octets of the message to fetch and to specify what messages to search for.

A top level folder list:

imap://user:password@mail.example.com

A folder list on the user's inbox:

imap://user:password@mail.example.com/INBOX

Select the user's inbox and fetch message with uid = 1:

imap://user:password@mail.example.com/INBOX/;UID=1

Select the user's inbox and fetch the first message in the mail box:

imap://user:password@mail.example.com/INBOX/;MAILINDEX=1

Select the user's inbox, check the UIDVALIDITY of the mailbox is 50 and fetch message 2 if it is:

imap://user:password@mail.example.com/INBOX;UIDVALIDITY=50/;UID=2

Select the user's inbox and fetch the text portion of message 3:

imap://user:password@mail.example.com/INBOX/;UID=3/;SECTION=TEXT

Select the user's inbox and fetch the first 1024 octets of message 4:

imap://user:password@mail.example.com/INBOX/;UID=4/;PARTIAL=0.1024

Select the user's inbox and check for NEW messages:

imap://user:password@mail.example.com/INBOX?NEW

Select the user's inbox and search for messages containing "shadows" in the subject line:

imap://user:password@mail.example.com/INBOX?SUBJECT%20shadows

Searching via the query part of the URL ? is a search request for the results to be returned as message sequence numbers (MAILINDEX). It is possible to make a search request for results to be returned as unique ID numbers (UID) by using a custom curl request via -X. UID numbers are unique per session (and multiple sessions when UIDVALIDITY is the same). For example, if you are searching for "foo bar" in header+body (TEXT) and you want the matching MAILINDEX numbers returned then you could search via URL:

imap://user:password@mail.example.com/INBOX?TEXT%20%22foo%20bar%22

If you want matching UID numbers you have to use a custom request:

imap://user:password@mail.example.com/INBOX -X "UID SEARCH TEXT \"foo bar\""

For more information about IMAP commands please see RFC 9051. For more information about the individual components of an IMAP URL please see RFC 5092.

  • Note old curl versions would FETCH by message sequence number when UID was specified in the URL. That was a bug fixed in 7.62.0, which added MAILINDEX to FETCH by mail sequence number.

LDAP

The path part of an LDAP request can be used to specify the: Distinguished Name, Attributes, Scope, Filter and Extension for an LDAP search. Each field is separated by a question mark and when that field is not required an empty string with the question mark separator should be included.

Search for the DN as My Organization:

ldap://ldap.example.com/o=My%20Organization

the same search but only return postalAddress attributes:

ldap://ldap.example.com/o=My%20Organization?postalAddress

Search for an empty DN and request information about the rootDomainNamingContext attribute for an Active Directory server:

ldap://ldap.example.com/?rootDomainNamingContext

For more information about the individual components of an LDAP URL please see RFC 4516.

POP3

The path part of a POP3 request specifies the message ID to retrieve. If the ID is not specified then a list of waiting messages is returned instead.

SCP

The path part of an SCP URL specifies the path and file to retrieve or upload. The file is taken as an absolute path from the root directory on the server.

To specify a path relative to the user's home directory on the server, prepend ~/ to the path portion.

SFTP

The path part of an SFTP URL specifies the file to retrieve or upload. If the path ends with a slash (/) then a directory listing is returned instead of a file. If the path is omitted entirely then the directory listing for the root / home directory is returned.

SMTP

The path part of an SMTP request specifies the hostname to present during communication with the mail server. If the path is omitted, then libcurl attempts to resolve the local computer's hostname. This may not return the fully qualified domain name that is required by some mail servers and specifying this path allows you to set an alternative name, such as your machine's fully qualified domain name, which you might have obtained from an external function such as gethostname or getaddrinfo.

The default smtp port is 25. Some servers use port 587 as an alternative.

1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
4SPDX-License-Identifier: curl
5-->
7# URL syntax and their use in curl
9## Specifications
11The official "URL syntax" is primarily defined in these two different
12specifications:
14- [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) (although URL is
15 called "URI" in there)
16- [The WHATWG URL Specification](https://url.spec.whatwg.org/)
18RFC 3986 is the earlier one, and curl has always tried to adhere to that one
19(since it shipped in January 2005).
21The WHATWG URL spec was written later, is incompatible with the RFC 3986 and
22changes over time.
24## Variations
26URL parsers as implemented in browsers, libraries and tools usually opt to
27support one of the mentioned specifications. Bugs, differences in
28interpretations and the moving nature of the WHATWG spec does however make it
29unlikely that multiple parsers treat URLs the same way.
31## Security
33Due to the inherent differences between URL parser implementations, it is
34considered a security risk to mix different implementations and assume the
35same behavior.
37For example, if you use one parser to check if a URL uses a good hostname or
38the correct auth field, and then pass on that same URL to a *second* parser,
39there is always a risk it treats the same URL differently. There is no right
40and wrong in URL land, only differences of opinions.
42libcurl offers a separate API to its URL parser for this reason, among others.
44Applications may at times find it convenient to allow users to specify URLs
45for various purposes and that string would then end up fed to curl. Getting a
46URL from an external untrusted party and using it with curl brings several
47security concerns:
491. If you have an application that runs as or in a server application, getting
50 an unfiltered URL can trick your application to access a local resource
51 instead of a remote resource. Protecting yourself against localhost accesses
52 is hard when accepting user provided URLs.
542. Such custom URLs can access other ports than you planned as port numbers
55 are part of the regular URL format. The combination of a local host and a
56 custom port number can allow external users to play tricks with your local
57 services.
593. Such a URL might use other schemes than you thought of or planned for.
61## "RFC 3986 plus"
63curl recognizes a URL syntax that we call "RFC 3986 plus". It is grounded on
64the well established RFC 3986 to make sure previously written command lines
65and curl using scripts remain working.
67curl's URL parser allows a few deviations from the spec in order to
68inter-operate better with URLs that appear in the wild.
70### Spaces
72A URL provided to curl cannot contain spaces. They need to be provided URL
73encoded to be accepted in a URL by curl.
75An exception to this rule: `Location:` response headers that indicate to a
76client where a resource has been redirected to, sometimes contain spaces. This
77is a violation of RFC 3986 but is fine in the WHATWG spec. curl handles these
78by re-encoding them to `%20`.
80### Non-ASCII
82Byte values in a provided URL that are outside of the printable ASCII range
83are percent-encoded by curl.
85### Multiple slashes
87An absolute URL always starts with a "scheme" followed by a colon. For all the
88schemes curl supports, the colon must be followed by two slashes according to
89RFC 3986 but not according to the WHATWG spec - which allows one to infinity
90amount.
92curl allows one, two or three slashes after the colon to still be considered a
93valid URL.
95### "scheme-less"
97curl supports "URLs" that do not start with a scheme. This is not supported by
98any of the specifications. This is a shortcut to entering URLs that was
99supported by browsers early on and has been mimicked by curl.
101Based on what the hostname starts with, curl "guesses" what protocol to use:
103- `ftp.` means FTP
104- `dict.` means DICT
105- `ldap.` means LDAP
106- `imap.` means IMAP
107- `smtp.` means SMTP
108- `pop3.` means POP3
109- all other means HTTP
111### Globbing letters
113The curl command line tool supports "globbing" of URLs. It means that you can
114create ranges and lists using `[N-M]` and `{one,two,three}` sequences. The
115letters used for this (`[]{}`) are reserved in RFC 3986 and can therefore not
116legitimately be part of such a URL.
118They are however not reserved or special in the WHATWG specification, so
119globbing can mess up such URLs. Globbing can be turned off for such occasions
120(using `--globoff`).
122# URL syntax details
124A URL may consist of the following components - many of them are optional:
126 [scheme][divider][userinfo][hostname][port number][path][query][fragment]
128Each component is separated from the following component with a divider
129character or string.
131For example, this could look like:
133 https://user:password@www.example.com:80/index.html?foo=bar#top
135## Scheme
137The scheme specifies the protocol to use. A curl build can support a few or
138many different schemes. You can limit what schemes curl should accept.
140curl supports the following schemes on URLs specified to transfer. They are
141matched case insensitively:
143`dict`, `file`, `ftp`, `ftps`, `gopher`, `gophers`, `http`, `https`, `imap`,
144`imaps`, `ldap`, `ldaps`, `mqtt`, `pop3`, `pop3s`, `rtsp`, `smtp`, `smtps`,
145`telnet`, `tftp`
147When the URL is specified to identify a proxy, curl recognizes the following
148schemes:
150`http`, `https`, `socks4`, `socks4a`, `socks5`, `socks5h`, `socks`
152## Userinfo
154The userinfo field can be used to set username and password for authentication
155purposes in this transfer. The use of this field is discouraged since it often
156means passing around the password in plain text and is thus a security risk.
158URLs for IMAP, POP3 and SMTP also support *login options* as part of the
159userinfo field. They are provided as a semicolon after the password and then
160the options.
162## Hostname
164The hostname part of the URL contains the address of the server that you want
165to connect to. This can be the fully qualified domain name of the server, the
166local network name of the machine on your network or the IP address of the
167server or machine represented by either an IPv4 or IPv6 address (within
168brackets). For example:
170 https://www.example.com/
172 https://hostname.example/
174 https://192.168.0.1/
176 https://[2001:1890:1112:1::20]/
178libcurl rejects hostnames with more than one trailing dot.
180### Numerical IPv4 addresses
182libcurl parses and normalizes everything that appears to be a numerical IPv4
183address. Including octal and hexadecimal formats and using one, two, three or
184four number groups.
186This normalizing is done so that curl can properly get documents from HTTP
187servers (with the correctly formatted address in the `Host:` header), so that
188IP based filtering for things like the `NO_PROXY` environment variable has a
189higher chance of working correctly, to increase the chances that two URLs can
190be compared and to allow users to extract and visualize the address in a readable
191way and to make sure libcurl works identically across different name resolver
192libraries and function calls.
194For a hostname that is only an IPv4 address with a trailing dot, the trailing
195dot is removed in the normalizing process.
197### Numerical IPv6 addresses
199libcurl allows a zone id to be provided with a numerical IPv6 address,
200separated with a percent character (`%`). The percent character may also be
201percent-encoded as `%25`. Like this:
203 http://[fe80::1%25eth0]/
205 http://[fe80::1%eth0]/
207### `IPvFuture`
209RFC 3986 documents a numerical IP address format called `IPvFuture`. libcurl
210does not recognize this format. Using it causes parse errors.
212### "localhost"
214Starting in curl 7.77.0, curl uses loopback IP addresses for the name
215`localhost`: `127.0.0.1` and `::1`. It does not resolve the name using the
216resolver functions.
218This is done to make sure the host accessed is truly the localhost - the local
219machine.
221### IDNA
223If curl was built with International Domain Name (IDN) support, it can also
224handle hostnames using non-ASCII characters.
226When built with libidn2, curl uses the IDNA 2008 standard. This is equivalent
227to the WHATWG URL spec, but differs from certain browsers that use IDNA 2003
228Transitional Processing. The two standards have a huge overlap but differ
229slightly, perhaps most famously in how they deal with the
230[German "double s"](https://en.wikipedia.org/wiki/%c3%9f).
232When WinIDN is used, curl uses IDNA 2003 Transitional Processing, like the rest
233of Windows.
235## Port number
237If there is a colon after the hostname, that should be followed by the port
238number to use. 1 - 65535. curl also supports a blank port number field - but
239only if the URL starts with a scheme.
241If the port number is not specified in the URL, curl uses a default port
242number based on the provide scheme:
244DICT 2628, FTP 21, FTPS 990, GOPHER 70, GOPHERS 70, HTTP 80, HTTPS 443, IMAP
245143, IMAPS 993, LDAP 389, LDAPS 636, MQTT 1883, POP3 110, POP3S 995, RTSP 554,
246SCP 22, SFTP 22, SMTP 25, SMTPS 465, TELNET 23, TFTP 69
248## Path
250By default, libcurl removes sequences of `/./` and `/../` from the path as per
251RFC 3986.
253libcurl might also normalize percent-encoded sequences to use uppercase
254hexadecimal letters.
256# Scheme specific behaviors
258## FTP
260The path part of an FTP request specifies the file to retrieve and from which
261directory. If the file part is omitted then libcurl downloads the directory
262listing for the directory specified. If the directory is omitted then the
263directory listing for the root / home directory is returned.
265FTP servers typically put the user in its "home directory" after login, which
266then differs between users. To explicitly specify the root directory of an FTP
267server, start the path with double slash `//` or `/%2f` (2F is the hexadecimal
268value of the ASCII code for the slash).
270## FILE
272When a `file://` URL is accessed on Windows systems, it can be crafted in a
273way so that Windows attempts to connect to a (remote) machine when curl wants
274to read or write such a path.
276curl only allows the hostname part of a FILE URL to be one out of these three
277alternatives: `localhost`, `127.0.0.1` or blank ("", zero characters).
278Anything else makes curl fail to parse the URL.
280### Windows-specific FILE details
282curl accepts that the FILE URL's path starts with a "drive letter". That is a
283single letter `a` to `z` followed by a colon or a pipe character (`|`).
285The Windows operating system itself converts some file accesses to perform
286network accesses over SMB/CIFS, through several different file path patterns.
287This way, a `file://` URL passed to curl *might* be converted into a network
288access inadvertently and unknowingly to curl. This is a Windows feature curl
289cannot control or disable.
291## IMAP
293The path part of an IMAP request not only specifies the mailbox to list or
294select, but can also be used to check the `UIDVALIDITY` of the mailbox, to
295specify the `UID`, `SECTION` and `PARTIAL` octets of the message to fetch and
296to specify what messages to search for.
298A top level folder list:
300 imap://user:password@mail.example.com
302A folder list on the user's inbox:
304 imap://user:password@mail.example.com/INBOX
306Select the user's inbox and fetch message with `uid = 1`:
308 imap://user:password@mail.example.com/INBOX/;UID=1
310Select the user's inbox and fetch the first message in the mail box:
312 imap://user:password@mail.example.com/INBOX/;MAILINDEX=1
314Select the user's inbox, check the `UIDVALIDITY` of the mailbox is 50 and
315fetch message 2 if it is:
317 imap://user:password@mail.example.com/INBOX;UIDVALIDITY=50/;UID=2
319Select the user's inbox and fetch the text portion of message 3:
321 imap://user:password@mail.example.com/INBOX/;UID=3/;SECTION=TEXT
323Select the user's inbox and fetch the first 1024 octets of message 4:
325 imap://user:password@mail.example.com/INBOX/;UID=4/;PARTIAL=0.1024
327Select the user's inbox and check for NEW messages:
329 imap://user:password@mail.example.com/INBOX?NEW
331Select the user's inbox and search for messages containing "shadows" in the
332subject line:
334 imap://user:password@mail.example.com/INBOX?SUBJECT%20shadows
336Searching via the query part of the URL `?` is a search request for the
337results to be returned as message sequence numbers (`MAILINDEX`). It is
338possible to make a search request for results to be returned as unique ID
339numbers (`UID`) by using a custom curl request via `-X`. `UID` numbers are
340unique per session (and multiple sessions when `UIDVALIDITY` is the same). For
341example, if you are searching for `"foo bar"` in header+body (`TEXT`) and you
342want the matching `MAILINDEX` numbers returned then you could search via URL:
344 imap://user:password@mail.example.com/INBOX?TEXT%20%22foo%20bar%22
346If you want matching `UID` numbers you have to use a custom request:
348 imap://user:password@mail.example.com/INBOX -X "UID SEARCH TEXT \"foo bar\""
350For more information about IMAP commands please see RFC 9051. For more
351information about the individual components of an IMAP URL please see RFC 5092.
353* Note old curl versions would `FETCH` by message sequence number when `UID`
354was specified in the URL. That was a bug fixed in 7.62.0, which added
355`MAILINDEX` to `FETCH` by mail sequence number.
357## LDAP
359The path part of an LDAP request can be used to specify the: Distinguished
360Name, Attributes, Scope, Filter and Extension for an LDAP search. Each field
361is separated by a question mark and when that field is not required an empty
362string with the question mark separator should be included.
364Search for the `DN` as `My Organization`:
366 ldap://ldap.example.com/o=My%20Organization
368the same search but only return `postalAddress` attributes:
370 ldap://ldap.example.com/o=My%20Organization?postalAddress
372Search for an empty `DN` and request information about the
373`rootDomainNamingContext` attribute for an Active Directory server:
375 ldap://ldap.example.com/?rootDomainNamingContext
377For more information about the individual components of an LDAP URL please see
378[RFC 4516](https://datatracker.ietf.org/doc/html/rfc4516).
380## POP3
382The path part of a POP3 request specifies the message ID to retrieve. If the
383ID is not specified then a list of waiting messages is returned instead.
385## SCP
387The path part of an SCP URL specifies the path and file to retrieve or
388upload. The file is taken as an absolute path from the root directory on the
389server.
391To specify a path relative to the user's home directory on the server, prepend
392`~/` to the path portion.
394## SFTP
396The path part of an SFTP URL specifies the file to retrieve or upload. If the
397path ends with a slash (`/`) then a directory listing is returned instead of a
398file. If the path is omitted entirely then the directory listing for the root
399/ home directory is returned.
401## SMTP
403The path part of an SMTP request specifies the hostname to present during
404communication with the mail server. If the path is omitted, then libcurl
405attempts to resolve the local computer's hostname. This may not return the
406fully qualified domain name that is required by some mail servers and
407specifying this path allows you to set an alternative name, such as your
408machine's fully qualified domain name, which you might have obtained from an
409external function such as gethostname or getaddrinfo.
411The default smtp port is 25. Some servers use port 587 as an alternative.
Diagnostics4 git calls · 32 ms
CallStatusSizeTime032 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=26
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2006.3 KiB · hit26 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=6435
git.response.cache=HIT
git.response.duration_ms=26
git.fetch.wants=6e6fed4d5aa66de08afc65d855da7571b104be69
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=6435
git.pkt.payload.max=6414
git.sideband.band1.bytes=6413
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e2d50a29a5689d
Request
7de077fc…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format