Update networking layer w/ CURL and emscripten impl

This commit is contained in:
2025-11-08 01:50:36 +11:00
parent a17925904d
commit f6874dc55a
4105 changed files with 694617 additions and 179 deletions
+42
View File
@@ -0,0 +1,42 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# Get SUPPORT, DPAGES variables
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
add_custom_command(OUTPUT "${CURL_MANPAGE}" "${CURL_ASCIIPAGE}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND "${PERL_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/scripts/managen" mainpage ${DPAGES} > "${CURL_MANPAGE}"
COMMAND "${PERL_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/scripts/managen" ascii ${DPAGES} > "${CURL_ASCIIPAGE}"
DEPENDS "${PROJECT_SOURCE_DIR}/scripts/managen" ${DPAGES} ${SUPPORT}
"${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc"
"${CMAKE_CURRENT_SOURCE_DIR}/mainpage.idx"
VERBATIM
)
add_custom_target(generate-curl.1 ALL DEPENDS "${CURL_MANPAGE}")
if(NOT CURL_DISABLE_INSTALL)
install(FILES "${CURL_MANPAGE}" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
endif()
+118
View File
@@ -0,0 +1,118 @@
<!--
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
-->
# curl man page generator
`managen` is the curl man page generator. It generates a single nroff man page
output from the set of sources files in this directory.
The `mainpage.idx` file lists all files that are rendered in that order to
produce the output. The magic `%options` keyword inserts all command line
options documented.
The `%options` documentation is created with one source file for each
supported command line option.
The documentation file format is described below. It is meant to look similar
to markdown which is why it uses `.md` file extensions.
## Option files
Each command line option is described in a file named `<long name>.d`, where
option name is written without any prefixing dashes. Like the filename for the
`-v, --verbose` option is named `verbose.d`.
Each file has a set of meta-data in the top of the file, followed by a body of
text.
The documentation files that do not document options have no meta-data part.
A line that starts with `<!--` is a comment. It should also end with `-->`.
### Meta-data
--- (start of meta-data)
Added: (version number in which this was added)
Arg: (the argument the option takes)
c: (copyright line)
Example:
- (an example command line, without "curl" and can use `$URL`)
- (another example)
Experimental: yes (if so)
Help: (short text for the --help output for this option)
Long: (long form name, without dashes)
Magic: (description of "magic" options)
Multi: single/append/boolean/mutex/custom/per-URL (if used more than once)
Mutexed: (space separated list of options this overrides, no dashes)
Protocols: (space separated list for which protocols this option works)
Requires: (space separated list of features this requires, no dashes)
Scope: global (if the option is global)
See-also:
- (a related option, no dashes)
- (another related option, no dashes)
Short: (single letter, without dash)
SPDX-License-Identifier: curl
Tags: (space separated list)
--- (end of meta-data)
### Body
The body of the description. Only refer to options with their long form option
version, like `--verbose`. The output generator replaces such option with the
correct markup that shows both short and long version.
Text written within `*asterisks*` is shown using italics. Text within two
`**asterisks**` is shown using bold.
Text that is prefixed with a space is treated like an "example" and gets
output in monospace.
Within the body, describe a list of items like this:
## item 1
description
## item 2
second description
The list is automatically terminated at end of file, or you can do it
explicitly with an empty "header":
##
Angle brackets (`<>`) need to be escaped when used in text like `\<` and
`\>`. This, to ensure that the text renders nicely as markdown.
### Headers
The `#` header can be used by non-option files and it produces a
`.SH` output.
If the `#` header is used for a command line option file, that header is
simply ignored in the generated output. It can still serve a purpose in the
source file as it helps the user identify what option the file is for.
### Variables
There are three different "variables" that can be used when creating the
output. They need to be written within backticks in the source file (to escape
getting spellchecked by CI jobs): `%DATE`, `%VERSION` and `%GLOBALS`.
## Generate
`managen mainpage [list of markdown option file names]`
This command outputs a single huge nroff file, meant to become `curl.1`. The
full curl man page.
`managen ascii [list of markdown option file names]`
This command outputs a single text file, meant to become `curl.txt`. The full
curl man page in text format, used to build `tool_hugehelp.c`.
`managen listhelp`
Generates a full `curl --help` output for all known command line options.
+64
View File
@@ -0,0 +1,64 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
AUTOMAKE_OPTIONS = foreign no-dependencies
MANPAGE = curl.1
ASCIIPAGE = curl.txt
# Get SUPPORT, DPAGES variables
include Makefile.inc
EXTRA_DIST = $(DPAGES) MANPAGE.md $(SUPPORT) CMakeLists.txt mainpage.idx
GEN = $(GN_$(V))
GN_0 = @echo " GENERATE" $@;
GN_1 =
GN_ = $(GN_0)
MANAGEN=$(top_srcdir)/scripts/managen
MAXLINE=$(top_srcdir)/scripts/maxline
# Maximum number of columns accepted in the ASCII version of the manpage
INCDIR=$(top_srcdir)/include
if BUILD_DOCS
CLEANFILES = $(MANPAGE) $(ASCIIPAGE)
man_MANS = $(MANPAGE)
all: $(MANPAGE) $(ASCIIPAGE)
endif
$(MANPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
$(GEN)(rm -f $(MANPAGE) && @PERL@ $(MANAGEN) -d $(srcdir) -I $(INCDIR) mainpage $(DPAGES) > manpage.tmp.$$$$ && mv manpage.tmp.$$$$ $(MANPAGE))
$(ASCIIPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
$(GEN)(rm -f $(ASCIIPAGE) && @PERL@ $(MANAGEN) -d $(srcdir) -I $(INCDIR) ascii $(DPAGES) > asciipage.tmp.$$$$ && mv asciipage.tmp.$$$$ $(ASCIIPAGE))
listhelp:
$(MANAGEN) -d $(srcdir) listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c
listcats:
@$(MANAGEN) listcats $(DPAGES)
+965
View File
@@ -0,0 +1,965 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# Shared between CMakeLists.txt and Makefile.am
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = docs/cmdline-opts
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/curl-amissl.m4 \
$(top_srcdir)/m4/curl-apple-sectrust.m4 \
$(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-gnutls.m4 \
$(top_srcdir)/m4/curl-mbedtls.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
$(top_srcdir)/m4/curl-override.m4 \
$(top_srcdir)/m4/curl-reentrant.m4 \
$(top_srcdir)/m4/curl-rustls.m4 \
$(top_srcdir)/m4/curl-schannel.m4 \
$(top_srcdir)/m4/curl-sysconfig.m4 \
$(top_srcdir)/m4/curl-wolfssl.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/xc-am-iface.m4 \
$(top_srcdir)/m4/xc-cc-check.m4 \
$(top_srcdir)/m4/xc-lt-iface.m4 \
$(top_srcdir)/m4/xc-val-flgs.m4 \
$(top_srcdir)/m4/zz40-xc-ovr.m4 \
$(top_srcdir)/m4/zz50-xc-ovr.m4 \
$(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp =
am__maybe_remake_depfiles =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)"
NROFF = nroff
MANS = $(man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APXS = @APXS@
AR = @AR@
AR_FLAGS = @AR_FLAGS@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
CADDY = @CADDY@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CURLVERSION = @CURLVERSION@
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
CURL_CA_EMBED = @CURL_CA_EMBED@
CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
CURL_CPP = @CURL_CPP@
CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX = @CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX@
CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME = @CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME@
CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
CYGPATH_W = @CYGPATH_W@
DANTED = @DANTED@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
GCOV = @GCOV@
GREP = @GREP@
HAVE_LIBZ = @HAVE_LIBZ@
HTTPD = @HTTPD@
HTTPD_NGHTTPX = @HTTPD_NGHTTPX@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_PC_CFLAGS = @LIBCURL_PC_CFLAGS@
LIBCURL_PC_CFLAGS_PRIVATE = @LIBCURL_PC_CFLAGS_PRIVATE@
LIBCURL_PC_LDFLAGS_PRIVATE = @LIBCURL_PC_LDFLAGS_PRIVATE@
LIBCURL_PC_LIBS = @LIBCURL_PC_LIBS@
LIBCURL_PC_LIBS_PRIVATE = @LIBCURL_PC_LIBS_PRIVATE@
LIBCURL_PC_REQUIRES = @LIBCURL_PC_REQUIRES@
LIBCURL_PC_REQUIRES_PRIVATE = @LIBCURL_PC_REQUIRES_PRIVATE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGCONFIG = @PKGCONFIG@
RANLIB = @RANLIB@
RC = @RC@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SSL_BACKENDS = @SSL_BACKENDS@
STRIP = @STRIP@
SUPPORT_FEATURES = @SUPPORT_FEATURES@
SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
TEST_NGHTTPX = @TEST_NGHTTPX@
VERSION = @VERSION@
VERSIONNUM = @VERSIONNUM@
VSFTPD = @VSFTPD@
ZLIB_LIBS = @ZLIB_LIBS@
ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libext = @libext@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
MANPAGE = curl.1
ASCIIPAGE = curl.txt
SUPPORT = \
_AUTHORS.md \
_BUGS.md \
_DESCRIPTION.md \
_ENVIRONMENT.md \
_EXITCODES.md \
_FILES.md \
_GLOBBING.md \
_NAME.md \
_OPTIONS.md \
_OUTPUT.md \
_PROGRESS.md \
_PROTOCOLS.md \
_PROXYPREFIX.md \
_SEEALSO.md \
_SYNOPSIS.md \
_URL.md \
_VARIABLES.md \
_VERSION.md \
_WWW.md
DPAGES = \
abstract-unix-socket.md \
alt-svc.md \
anyauth.md \
append.md \
aws-sigv4.md \
basic.md \
ca-native.md \
cacert.md \
capath.md \
cert-status.md \
cert-type.md \
cert.md \
ciphers.md \
compressed-ssh.md \
compressed.md \
config.md \
connect-timeout.md \
connect-to.md \
continue-at.md \
cookie-jar.md \
cookie.md \
create-dirs.md \
create-file-mode.md \
crlf.md \
crlfile.md \
curves.md \
data-ascii.md \
data-binary.md \
data-raw.md \
data-urlencode.md \
data.md \
delegation.md \
digest.md \
disable-eprt.md \
disable-epsv.md \
disable.md \
disallow-username-in-url.md \
dns-interface.md \
dns-ipv4-addr.md \
dns-ipv6-addr.md \
dns-servers.md \
doh-cert-status.md \
doh-insecure.md \
doh-url.md \
dump-ca-embed.md \
dump-header.md \
ech.md \
egd-file.md \
engine.md \
etag-compare.md \
etag-save.md \
expect100-timeout.md \
fail-early.md \
fail-with-body.md \
fail.md \
false-start.md \
follow.md \
form-escape.md \
form-string.md \
form.md \
ftp-account.md \
ftp-alternative-to-user.md \
ftp-create-dirs.md \
ftp-method.md \
ftp-pasv.md \
ftp-port.md \
ftp-pret.md \
ftp-skip-pasv-ip.md \
ftp-ssl-ccc-mode.md \
ftp-ssl-ccc.md \
ftp-ssl-control.md \
get.md \
globoff.md \
happy-eyeballs-timeout-ms.md \
haproxy-protocol.md \
haproxy-clientip.md \
head.md \
header.md \
help.md \
hostpubmd5.md \
hostpubsha256.md \
hsts.md \
http0.9.md \
http1.0.md \
http1.1.md \
http2-prior-knowledge.md \
http2.md \
http3.md \
http3-only.md \
ignore-content-length.md \
insecure.md \
interface.md \
ip-tos.md \
ipfs-gateway.md \
ipv4.md \
ipv6.md \
json.md \
junk-session-cookies.md \
keepalive-cnt.md \
keepalive-time.md \
key-type.md \
key.md \
knownhosts.md \
krb.md \
libcurl.md \
limit-rate.md \
list-only.md \
local-port.md \
location-trusted.md \
location.md \
login-options.md \
mail-auth.md \
mail-from.md \
mail-rcpt-allowfails.md \
mail-rcpt.md \
manual.md \
max-filesize.md \
max-redirs.md \
max-time.md \
metalink.md \
mptcp.md \
negotiate.md \
netrc-file.md \
netrc-optional.md \
netrc.md \
next.md \
no-alpn.md \
no-buffer.md \
no-clobber.md \
no-keepalive.md \
no-npn.md \
no-progress-meter.md \
no-sessionid.md \
noproxy.md \
ntlm-wb.md \
ntlm.md \
oauth2-bearer.md \
output-dir.md \
out-null.md \
output.md \
parallel-immediate.md \
parallel-max-host.md \
parallel-max.md \
parallel.md \
pass.md \
path-as-is.md \
pinnedpubkey.md \
post301.md \
post302.md \
post303.md \
preproxy.md \
progress-bar.md \
proto-default.md \
proto-redir.md \
proto.md \
proxy-anyauth.md \
proxy-basic.md \
proxy-ca-native.md \
proxy-cacert.md \
proxy-capath.md \
proxy-cert-type.md \
proxy-cert.md \
proxy-ciphers.md \
proxy-crlfile.md \
proxy-digest.md \
proxy-header.md \
proxy-http2.md \
proxy-insecure.md \
proxy-key-type.md \
proxy-key.md \
proxy-negotiate.md \
proxy-ntlm.md \
proxy-pass.md \
proxy-pinnedpubkey.md \
proxy-service-name.md \
proxy-ssl-allow-beast.md \
proxy-ssl-auto-client-cert.md \
proxy-tls13-ciphers.md \
proxy-tlsauthtype.md \
proxy-tlspassword.md \
proxy-tlsuser.md \
proxy-tlsv1.md \
proxy-user.md \
proxy.md \
proxy1.0.md \
proxytunnel.md \
pubkey.md \
quote.md \
random-file.md \
range.md \
rate.md \
raw.md \
referer.md \
remote-header-name.md \
remote-name-all.md \
remote-name.md \
remote-time.md \
remove-on-error.md \
request-target.md \
request.md \
resolve.md \
retry-all-errors.md \
retry-connrefused.md \
retry-delay.md \
retry-max-time.md \
retry.md \
sasl-authzid.md \
sasl-ir.md \
service-name.md \
show-error.md \
show-headers.md \
silent.md \
sigalgs.md \
skip-existing.md \
socks4.md \
socks4a.md \
socks5-basic.md \
socks5-gssapi-nec.md \
socks5-gssapi-service.md \
socks5-gssapi.md \
socks5-hostname.md \
socks5.md \
speed-limit.md \
speed-time.md \
ssl-allow-beast.md \
ssl-auto-client-cert.md \
ssl-no-revoke.md \
ssl-reqd.md \
ssl-revoke-best-effort.md \
ssl-sessions.md \
ssl.md \
sslv2.md \
sslv3.md \
stderr.md \
styled-output.md \
suppress-connect-headers.md \
tcp-fastopen.md \
tcp-nodelay.md \
telnet-option.md \
tftp-blksize.md \
tftp-no-options.md \
time-cond.md \
tls-earlydata.md \
tls-max.md \
tls13-ciphers.md \
tlsauthtype.md \
tlspassword.md \
tlsuser.md \
tlsv1.0.md \
tlsv1.1.md \
tlsv1.2.md \
tlsv1.3.md \
tlsv1.md \
tr-encoding.md \
trace-ascii.md \
trace-config.md \
trace-ids.md \
trace-time.md \
trace.md \
unix-socket.md \
upload-file.md \
upload-flags.md \
url.md \
url-query.md \
use-ascii.md \
user-agent.md \
user.md \
variable.md \
verbose.md \
version.md \
vlan-priority.md \
write-out.md \
xattr.md
# Get SUPPORT, DPAGES variables
EXTRA_DIST = $(DPAGES) MANPAGE.md $(SUPPORT) CMakeLists.txt mainpage.idx
GEN = $(GN_$(V))
GN_0 = @echo " GENERATE" $@;
GN_1 =
GN_ = $(GN_0)
MANAGEN = $(top_srcdir)/scripts/managen
MAXLINE = $(top_srcdir)/scripts/maxline
# Maximum number of columns accepted in the ASCII version of the manpage
INCDIR = $(top_srcdir)/include
@BUILD_DOCS_TRUE@CLEANFILES = $(MANPAGE) $(ASCIIPAGE)
@BUILD_DOCS_TRUE@man_MANS = $(MANPAGE)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/cmdline-opts/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign docs/cmdline-opts/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(srcdir)/Makefile.inc $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man1dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.1[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
done; }
uninstall-man1:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man1
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man
uninstall-man: uninstall-man1
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man1 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags-am uninstall uninstall-am uninstall-man \
uninstall-man1
.PRECIOUS: Makefile
@BUILD_DOCS_TRUE@all: $(MANPAGE) $(ASCIIPAGE)
$(MANPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
$(GEN)(rm -f $(MANPAGE) && @PERL@ $(MANAGEN) -d $(srcdir) -I $(INCDIR) mainpage $(DPAGES) > manpage.tmp.$$$$ && mv manpage.tmp.$$$$ $(MANPAGE))
$(ASCIIPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
$(GEN)(rm -f $(ASCIIPAGE) && @PERL@ $(MANAGEN) -d $(srcdir) -I $(INCDIR) ascii $(DPAGES) > asciipage.tmp.$$$$ && mv asciipage.tmp.$$$$ $(ASCIIPAGE))
listhelp:
$(MANAGEN) -d $(srcdir) listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c
listcats:
@$(MANAGEN) listcats $(DPAGES)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+320
View File
@@ -0,0 +1,320 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# Shared between CMakeLists.txt and Makefile.am
SUPPORT = \
_AUTHORS.md \
_BUGS.md \
_DESCRIPTION.md \
_ENVIRONMENT.md \
_EXITCODES.md \
_FILES.md \
_GLOBBING.md \
_NAME.md \
_OPTIONS.md \
_OUTPUT.md \
_PROGRESS.md \
_PROTOCOLS.md \
_PROXYPREFIX.md \
_SEEALSO.md \
_SYNOPSIS.md \
_URL.md \
_VARIABLES.md \
_VERSION.md \
_WWW.md
DPAGES = \
abstract-unix-socket.md \
alt-svc.md \
anyauth.md \
append.md \
aws-sigv4.md \
basic.md \
ca-native.md \
cacert.md \
capath.md \
cert-status.md \
cert-type.md \
cert.md \
ciphers.md \
compressed-ssh.md \
compressed.md \
config.md \
connect-timeout.md \
connect-to.md \
continue-at.md \
cookie-jar.md \
cookie.md \
create-dirs.md \
create-file-mode.md \
crlf.md \
crlfile.md \
curves.md \
data-ascii.md \
data-binary.md \
data-raw.md \
data-urlencode.md \
data.md \
delegation.md \
digest.md \
disable-eprt.md \
disable-epsv.md \
disable.md \
disallow-username-in-url.md \
dns-interface.md \
dns-ipv4-addr.md \
dns-ipv6-addr.md \
dns-servers.md \
doh-cert-status.md \
doh-insecure.md \
doh-url.md \
dump-ca-embed.md \
dump-header.md \
ech.md \
egd-file.md \
engine.md \
etag-compare.md \
etag-save.md \
expect100-timeout.md \
fail-early.md \
fail-with-body.md \
fail.md \
false-start.md \
follow.md \
form-escape.md \
form-string.md \
form.md \
ftp-account.md \
ftp-alternative-to-user.md \
ftp-create-dirs.md \
ftp-method.md \
ftp-pasv.md \
ftp-port.md \
ftp-pret.md \
ftp-skip-pasv-ip.md \
ftp-ssl-ccc-mode.md \
ftp-ssl-ccc.md \
ftp-ssl-control.md \
get.md \
globoff.md \
happy-eyeballs-timeout-ms.md \
haproxy-protocol.md \
haproxy-clientip.md \
head.md \
header.md \
help.md \
hostpubmd5.md \
hostpubsha256.md \
hsts.md \
http0.9.md \
http1.0.md \
http1.1.md \
http2-prior-knowledge.md \
http2.md \
http3.md \
http3-only.md \
ignore-content-length.md \
insecure.md \
interface.md \
ip-tos.md \
ipfs-gateway.md \
ipv4.md \
ipv6.md \
json.md \
junk-session-cookies.md \
keepalive-cnt.md \
keepalive-time.md \
key-type.md \
key.md \
knownhosts.md \
krb.md \
libcurl.md \
limit-rate.md \
list-only.md \
local-port.md \
location-trusted.md \
location.md \
login-options.md \
mail-auth.md \
mail-from.md \
mail-rcpt-allowfails.md \
mail-rcpt.md \
manual.md \
max-filesize.md \
max-redirs.md \
max-time.md \
metalink.md \
mptcp.md \
negotiate.md \
netrc-file.md \
netrc-optional.md \
netrc.md \
next.md \
no-alpn.md \
no-buffer.md \
no-clobber.md \
no-keepalive.md \
no-npn.md \
no-progress-meter.md \
no-sessionid.md \
noproxy.md \
ntlm-wb.md \
ntlm.md \
oauth2-bearer.md \
output-dir.md \
out-null.md \
output.md \
parallel-immediate.md \
parallel-max-host.md \
parallel-max.md \
parallel.md \
pass.md \
path-as-is.md \
pinnedpubkey.md \
post301.md \
post302.md \
post303.md \
preproxy.md \
progress-bar.md \
proto-default.md \
proto-redir.md \
proto.md \
proxy-anyauth.md \
proxy-basic.md \
proxy-ca-native.md \
proxy-cacert.md \
proxy-capath.md \
proxy-cert-type.md \
proxy-cert.md \
proxy-ciphers.md \
proxy-crlfile.md \
proxy-digest.md \
proxy-header.md \
proxy-http2.md \
proxy-insecure.md \
proxy-key-type.md \
proxy-key.md \
proxy-negotiate.md \
proxy-ntlm.md \
proxy-pass.md \
proxy-pinnedpubkey.md \
proxy-service-name.md \
proxy-ssl-allow-beast.md \
proxy-ssl-auto-client-cert.md \
proxy-tls13-ciphers.md \
proxy-tlsauthtype.md \
proxy-tlspassword.md \
proxy-tlsuser.md \
proxy-tlsv1.md \
proxy-user.md \
proxy.md \
proxy1.0.md \
proxytunnel.md \
pubkey.md \
quote.md \
random-file.md \
range.md \
rate.md \
raw.md \
referer.md \
remote-header-name.md \
remote-name-all.md \
remote-name.md \
remote-time.md \
remove-on-error.md \
request-target.md \
request.md \
resolve.md \
retry-all-errors.md \
retry-connrefused.md \
retry-delay.md \
retry-max-time.md \
retry.md \
sasl-authzid.md \
sasl-ir.md \
service-name.md \
show-error.md \
show-headers.md \
silent.md \
sigalgs.md \
skip-existing.md \
socks4.md \
socks4a.md \
socks5-basic.md \
socks5-gssapi-nec.md \
socks5-gssapi-service.md \
socks5-gssapi.md \
socks5-hostname.md \
socks5.md \
speed-limit.md \
speed-time.md \
ssl-allow-beast.md \
ssl-auto-client-cert.md \
ssl-no-revoke.md \
ssl-reqd.md \
ssl-revoke-best-effort.md \
ssl-sessions.md \
ssl.md \
sslv2.md \
sslv3.md \
stderr.md \
styled-output.md \
suppress-connect-headers.md \
tcp-fastopen.md \
tcp-nodelay.md \
telnet-option.md \
tftp-blksize.md \
tftp-no-options.md \
time-cond.md \
tls-earlydata.md \
tls-max.md \
tls13-ciphers.md \
tlsauthtype.md \
tlspassword.md \
tlsuser.md \
tlsv1.0.md \
tlsv1.1.md \
tlsv1.2.md \
tlsv1.3.md \
tlsv1.md \
tr-encoding.md \
trace-ascii.md \
trace-config.md \
trace-ids.md \
trace-time.md \
trace.md \
unix-socket.md \
upload-file.md \
upload-flags.md \
url.md \
url-query.md \
use-ascii.md \
user-agent.md \
user.md \
variable.md \
verbose.md \
version.md \
vlan-priority.md \
write-out.md \
xattr.md
+5
View File
@@ -0,0 +1,5 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# AUTHORS
Daniel Stenberg is the main author, but the whole list of contributors is
found in the separate THANKS file.
+5
View File
@@ -0,0 +1,5 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# BUGS
If you experience any problems with curl, submit an issue in the project's bug
tracker on GitHub: https://github.com/curl/curl/issues
+11
View File
@@ -0,0 +1,11 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# DESCRIPTION
**curl** is a tool for transferring data from or to a server using URLs. It
supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS,
IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP,
SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS.
curl is powered by libcurl for all transfer-related features. See
*libcurl(3)* for details.
+119
View File
@@ -0,0 +1,119 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# ENVIRONMENT
The environment variables can be specified in lower case or upper case. The
lower case version has precedence. `http_proxy` is an exception as it is only
available in lower case.
Using an environment variable to set the proxy has the same effect as using
the --proxy option.
## `http_proxy [protocol://]<host>[:port]`
Sets the proxy server to use for HTTP.
## `HTTPS_PROXY [protocol://]<host>[:port]`
Sets the proxy server to use for HTTPS.
## `[url-protocol]_PROXY [protocol://]<host>[:port]`
Sets the proxy server to use for [url-protocol], where the protocol is a
protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
SMTP, LDAP, etc.
## `ALL_PROXY [protocol://]<host>[:port]`
Sets the proxy server to use if no protocol-specific proxy is set.
## `NO_PROXY <comma-separated list of hosts/domains>`
list of hostnames that should not go through any proxy. If set to an asterisk
'*' only, it matches all hosts. Each name in this list is matched as either a
domain name which contains the hostname, or the hostname itself.
This environment variable disables use of the proxy even when specified with
the --proxy option. That is
NO_PROXY=direct.example.com curl -x http://proxy.example.com
http://direct.example.com
accesses the target URL directly, and
NO_PROXY=direct.example.com curl -x http://proxy.example.com
http://somewhere.example.com
accesses the target URL through the proxy.
The list of hostnames can also include numerical IP addresses, and IPv6
versions should then be given without enclosing brackets.
IP addresses can be specified using CIDR notation: an appended slash and
number specifies the number of "network bits" out of the address to use in the
comparison (added in 7.86.0). For example "192.168.0.0/16" would match all
addresses starting with "192.168".
## `APPDATA <directory>`
On Windows, this variable is used when trying to find the home directory. If
the primary home variables are all unset.
## `COLUMNS <terminal width>`
If set, the specified number of characters is used as the terminal width when
the alternative progress-bar is shown. If not set, curl tries to figure it out
using other ways.
## `CURL_CA_BUNDLE <file>`
If set, it is used as the --cacert value. This environment variable is ignored
if Schannel is used as the TLS backend.
## `CURL_HOME <directory>`
If set, is the first variable curl checks when trying to find its home
directory. If not set, it continues to check *XDG_CONFIG_HOME*
## `CURL_SSL_BACKEND <TLS backend>`
If curl was built with support for "MultiSSL", meaning that it has built-in
support for more than one TLS backend, this environment variable can be set to
the case insensitive name of the particular backend to use when curl is
invoked. Setting a name that is not a built-in alternative makes curl stay
with the default.
SSL backend names (case-insensitive): **gnutls**, **mbedtls**, **openssl**,
**rustls**, **schannel**, **wolfssl**
## `HOME <directory>`
If set, this is used to find the home directory when that is needed. Like when
looking for the default .curlrc. *CURL_HOME* and *XDG_CONFIG_HOME*
have preference.
## `NETRC <path>`
If set, this is used to find the `.netrc` file. It overrides all other netrc
file location mechanisms and should be set to the full file path.
(Added in curl 8.16.0)
## `QLOGDIR <directory>`
If curl was built with HTTP/3 support, setting this environment variable to a
local directory makes curl produce **qlogs** in that directory, using file
names named after the destination connection id (in hex). Do note that these
files can become rather large. Works with the ngtcp2 and quiche QUIC backends.
## `SHELL`
Used on VMS when trying to detect if using a **DCL** or a **Unix** shell.
## `SSL_CERT_DIR <directory>`
If set, it is used as the --capath value. This environment variable is ignored
if Schannel is used as the TLS backend.
## `SSL_CERT_FILE <path>`
If set, it is used as the --cacert value. This environment variable is ignored
if Schannel is used as the TLS backend.
## `SSLKEYLOGFILE <path>`
If you set this environment variable to a filename, curl stores TLS secrets
from its connections in that file when invoked to enable you to analyze the
TLS traffic in real time using network analyzing tools such as Wireshark. This
works with the following TLS backends: OpenSSL, LibreSSL (TLS 1.2 max),
BoringSSL, GnuTLS, wolfSSL and Rustls.
## `USERPROFILE <directory>`
On Windows, this variable is used when trying to find the home directory. If
the other, primary, variables are all unset. If set, curl uses the path
**"$USERPROFILE\Application Data"**.
## `XDG_CONFIG_HOME <directory>`
If *CURL_HOME* is not set, this variable is checked when looking for a
default .curlrc file.
+203
View File
@@ -0,0 +1,203 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# EXIT CODES
There are a bunch of different error codes and their corresponding error
messages that may appear under error conditions. At the time of this writing,
the exit codes are:
## 0
Success. The operation completed successfully according to the instructions.
## 1
Unsupported protocol. This build of curl has no support for this protocol.
## 2
Failed to initialize.
## 3
URL malformed. The syntax was not correct.
## 4
A feature or option that was needed to perform the desired request was not
enabled or was explicitly disabled at build-time. To make curl able to do
this, you probably need another build of libcurl.
## 5
Could not resolve proxy. The given proxy host could not be resolved.
## 6
Could not resolve host. The given remote host could not be resolved.
## 7
Failed to connect to host.
## 8
Weird server reply. The server sent data curl could not parse.
## 9
FTP access denied. The server denied login or denied access to the particular
resource or directory you wanted to reach. Most often you tried to change to a
directory that does not exist on the server.
## 10
FTP accept failed. While waiting for the server to connect back when an active
FTP session is used, an error code was sent over the control connection or
similar.
## 11
FTP weird PASS reply. curl could not parse the reply sent to the PASS request.
## 12
During an active FTP session while waiting for the server to connect back to
curl, the timeout expired.
## 13
FTP weird PASV reply, curl could not parse the reply sent to the PASV request.
## 14
FTP weird 227 format. curl could not parse the 227-line the server sent.
## 15
FTP cannot use host. Could not resolve the host IP we got in the 227-line.
## 16
HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is
somewhat generic and can be one out of several problems, see the error message
for details.
## 17
FTP could not set binary. Could not change transfer method to binary.
## 18
Partial file. Only a part of the file was transferred.
## 19
FTP could not download/access the given file, the RETR (or similar) command
failed.
## 21
FTP quote error. A quote command returned error from the server.
## 22
HTTP page not retrieved. The requested URL was not found or returned another
error with the HTTP error code being 400 or above. This return code only
appears if --fail is used.
## 23
Write error. curl could not write data to a local file system or similar.
## 25
Failed starting the upload. For FTP, the server typically denied the STOR
command.
## 26
Read error. Various reading problems.
## 27
Out of memory. A memory allocation request failed.
## 28
Operation timeout. The specified time-out period was reached according to the
conditions.
## 30
FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
command, try doing a transfer using PASV instead.
## 31
FTP could not use REST. The REST command failed. This command is used for
resumed FTP transfers.
## 33
HTTP range error. The range "command" did not work.
## 34
HTTP post error. Internal post-request generation error.
## 35
SSL connect error. The SSL handshaking failed.
## 36
Bad download resume. Could not continue an earlier aborted download.
## 37
FILE could not read file. Failed to open the file. Permissions?
## 38
LDAP cannot bind. LDAP bind operation failed.
## 39
LDAP search failed.
## 41
Function not found. A required LDAP function was not found.
## 42
Aborted by callback. An application told curl to abort the operation.
## 43
Internal error. A function was called with a bad parameter.
## 45
Interface error. A specified outgoing interface could not be used.
## 47
Too many redirects. When following redirects, curl hit the maximum amount.
## 48
Unknown option specified to libcurl. This indicates that you passed a weird
option to curl that was passed on to libcurl and rejected. Read up in the
manual.
## 49
Malformed telnet option.
## 52
The server did not reply anything, which here is considered an error.
## 53
SSL crypto engine not found.
## 54
Cannot set SSL crypto engine as default.
## 55
Failed sending network data.
## 56
Failure in receiving network data.
## 58
Problem with the local certificate.
## 59
Could not use specified SSL cipher.
## 60
Peer certificate cannot be authenticated with known CA certificates.
## 61
Unrecognized transfer encoding.
## 63
Maximum file size exceeded.
## 64
Requested FTP SSL level failed.
## 65
Sending the data requires a rewind that failed.
## 66
Failed to initialize SSL Engine.
## 67
The username, password, or similar was not accepted and curl failed to log in.
## 68
File not found on TFTP server.
## 69
Permission problem on TFTP server.
## 70
Out of disk space on TFTP server.
## 71
Illegal TFTP operation.
## 72
Unknown TFTP transfer ID.
## 73
File already exists (TFTP).
## 74
No such user (TFTP).
## 77
Problem reading the SSL CA cert (path? access rights?).
## 78
The resource referenced in the URL does not exist.
## 79
An unspecified error occurred during the SSH session.
## 80
Failed to shut down the SSL connection.
## 82
Could not load CRL file, missing or wrong format (added in 7.19.0).
## 83
Issuer check failed (added in 7.19.0).
## 84
The FTP PRET command failed.
## 85
Mismatch of RTSP CSeq numbers.
## 86
Mismatch of RTSP Session Identifiers.
## 87
Unable to parse FTP file list.
## 88
FTP chunk callback reported error.
## 89
No connection available, the session is queued.
## 90
SSL public key does not match pinned public key.
## 91
Invalid SSL certificate status.
## 92
Stream error in HTTP/2 framing layer.
## 93
An API function was called from inside a callback.
## 94
An authentication function returned an error.
## 95
A problem was detected in the HTTP/3 layer. This is somewhat generic and can
be one out of several problems, see the error message for details.
## 96
QUIC connection error. This error may be caused by an SSL library error. QUIC
is the protocol used for HTTP/3 transfers.
## 97
Proxy handshake error.
## 98
A client-side certificate is required to complete the TLS handshake.
## 99
Poll or select returned fatal error.
## 100
A value or data field grew larger than allowed.
## XX
More error codes might appear here in future releases. The existing ones are
meant to never change.
+6
View File
@@ -0,0 +1,6 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# FILES
*~/.curlrc*
Default config file, see --config for details.
+40
View File
@@ -0,0 +1,40 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# GLOBBING
You can specify multiple URLs or parts of URLs by writing lists within braces
or ranges within brackets. We call this "globbing".
Provide a list with three different names like this:
http://site.{one,two,three}.com
Do sequences of alphanumeric series by using [] as in:
ftp://ftp.example.com/file[1-100].txt
With leading zeroes:
ftp://ftp.example.com/file[001-100].txt
With letters through the alphabet:
ftp://ftp.example.com/file[a-z].txt
Nested sequences are not supported, but you can use several ones next to each
other:
http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
You can specify a step counter for the ranges to get every Nth number or
letter:
http://example.com/file[1-100:10].txt
http://example.com/file[a-z:2].txt
When using [] or {} sequences when invoked from a command line prompt, you
probably have to put the full URL within double quotes to avoid the shell from
interfering with it. This also goes for other characters treated special, like
for example '&', '?' and '*'.
Switch off globbing with --globoff.
+4
View File
@@ -0,0 +1,4 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# NAME
curl - transfer a URL
+39
View File
@@ -0,0 +1,39 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# OPTIONS
Options start with one or two dashes. Many of the options require an
additional value next to them. If provided text does not start with a dash, it
is presumed to be and treated as a URL.
The short "single-dash" form of the options, -d for example, may be used with
or without a space between it and its value, although a space is a recommended
separator. The long double-dash form, --data for example, requires a space
between it and its value.
Short version options that do not need any additional values can be used
immediately next to each other, like for example you can specify all the
options *-O*, *-L* and *-v* at once as *-OLv*.
In general, all boolean options are enabled with --**option** and yet again
disabled with --**no-**option. That is, you use the same option name but
prefix it with `no-`. However, in this list we mostly only list and show the
--**option** version of them.
When --next is used, it resets the parser state and you start again with a
clean option state, except for the options that are global. Global options
retain their values and meaning even after --next.
If the long option name ends with an equals sign (`=`), the argument is the
text following on its right side. (Added in 8.16.0)
The first argument that is exactly two dashes (`--`), marks the end of
options; any argument after the end of options is interpreted as a URL
argument even if it starts with a dash.
curl does little to no verification of the contents of command line arguments.
Passing in "creative octets" like newlines might trigger unexpected results.
The following options are global: `%GLOBALS`.
# ALL OPTIONS
+11
View File
@@ -0,0 +1,11 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# OUTPUT
If not told otherwise, curl writes the received data to stdout. It can be
instructed to instead save that data into a local file, using the --output or
--remote-name options. If curl is given multiple URLs to transfer on the
command line, it similarly needs multiple options for where to save them.
curl does not parse or otherwise "understand" the content it gets or writes as
output. It does no encoding or decoding, unless explicitly asked to with
dedicated command line options.
+25
View File
@@ -0,0 +1,25 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# PROGRESS METER
curl normally displays a progress meter during operations, indicating the
amount of transferred data, transfer speeds and estimated time left, etc. The
progress meter displays the transfer rate in bytes per second. The suffixes
(`k` for kilo, `M` for mega, `G` for giga, `T` for tera, and `P` for peta) are
1024 based. For example 1k is 1024 bytes. 1M is 1048576 bytes.
curl displays this data to the terminal by default, so if you invoke curl to
do an operation and it is about to write data to the terminal, it *disables*
the progress meter as otherwise it would mess up the output mixing progress
meter and response data.
If you want a progress meter for HTTP POST or PUT requests, you need to
redirect the response output to a file, using shell redirect (\>), --output
or similar.
This does not apply to FTP upload as that operation does not spit out any
response data to the terminal.
If you prefer a progress bar instead of the regular meter, --progress-bar is
your friend. You can also disable the progress meter completely with the
--silent option.
+53
View File
@@ -0,0 +1,53 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# PROTOCOLS
curl supports numerous protocols, or put in URL terms: schemes. Your
particular build may not support them all.
## DICT
Lets you lookup words using online dictionaries.
## FILE
Read or write local files. curl does not support accessing file:// URL
remotely, but when running on Microsoft Windows using the native UNC approach
works. Only absolute paths.
## FTP(S)
curl supports the File Transfer Protocol with a lot of tweaks and levers. With
or without using TLS.
## GOPHER(S)
Retrieve files.
## HTTP(S)
curl supports HTTP with numerous options and variations. It can speak HTTP
version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct
command line options.
## IMAP(S)
Using the mail reading protocol, curl can download emails for you. With or
without using TLS.
## LDAP(S)
curl can do directory lookups for you, with or without TLS.
## MQTT
curl supports MQTT version 3. Downloading over MQTT equals subscribing to a
topic while uploading/posting equals publishing on a topic. MQTT over TLS is not
supported (yet).
## POP3(S)
Downloading from a pop3 server means getting an email. With or without using
TLS.
## RTMP(S)
The **Realtime Messaging Protocol** is primarily used to serve streaming media
and curl can download it.
## RTSP
curl supports RTSP 1.0 downloads.
## SCP
curl supports SSH version 2 scp transfers.
## SFTP
curl supports SFTP (draft 5) done over SSH version 2.
## SMB(S)
curl supports SMB version 1 for upload and download.
## SMTP(S)
Uploading contents to an SMTP server means sending an email. With or without
TLS.
## TELNET
Fetching a telnet URL starts an interactive session where it sends what it
reads on stdin and outputs what the server sends it.
## TFTP
curl can do TFTP downloads and uploads.
## WS(S)
WebSocket done over HTTP/1. WSS implies that it works over HTTPS.
+22
View File
@@ -0,0 +1,22 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# PROXY PROTOCOL PREFIXES
The proxy string may be specified with a protocol:// prefix to specify
alternative proxy protocols. (Added in 7.21.7)
If no protocol is specified in the proxy string or if the string does not
match a supported one, the proxy is treated as an HTTP proxy.
The supported proxy protocol prefixes are as follows:
## http://
Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
## https://
Makes it treated as an **HTTPS** proxy.
## socks4://
Makes it the equivalent of --socks4
## socks4a://
Makes it the equivalent of --socks4a
## socks5://
Makes it the equivalent of --socks5
## socks5h://
Makes it the equivalent of --socks5-hostname
+5
View File
@@ -0,0 +1,5 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# SEE ALSO
**ftp(1)**, **wget(1)**
+5
View File
@@ -0,0 +1,5 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# SYNOPSIS
**curl [options / URLs]**
+28
View File
@@ -0,0 +1,28 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# URL
The URL syntax is protocol-dependent. You find a detailed description in
RFC 3986.
If you provide a URL without a leading **protocol://** scheme, curl guesses
what protocol you want. It then defaults to HTTP but assumes others based on
often-used hostname prefixes. For example, for hostnames starting with `ftp.`
curl assumes you want FTP.
You can specify any amount of URLs on the command line. They are fetched in a
sequential manner in the specified order unless you use --parallel. You can
specify command line options and URLs mixed and in any order on the command
line.
curl attempts to reuse connections when doing multiple transfers, so that
getting many files from the same server do not use multiple connects and setup
handshakes. This improves speed. Connection reuse can only be done for URLs
specified for a single command line invocation and cannot be performed between
separate curl runs.
Provide an IPv6 zone id in the URL with an escaped percentage sign. Like in
http://[fe80::3%25eth0]/
Everything provided on the command line that is not a command line option or
its argument, curl assumes is a URL and treats it as such.
+44
View File
@@ -0,0 +1,44 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# VARIABLES
curl supports command line variables (added in 8.3.0). Set variables with
--variable name=content or --variable name@file (where `file` can be stdin if
set to a single dash (-)).
Variable contents can be expanded in option parameters using `{{name}}` if the
option name is prefixed with `--expand-`. This gets the contents of the
variable `name` inserted, or a blank if the name does not exist as a
variable. Insert `{{` verbatim in the string by prefixing it with a backslash,
like `\{{`.
You access and expand environment variables by first importing them. You
select to either require the environment variable to be set or you can provide
a default value in case it is not already set. Plain `--variable %name`
imports the variable called `name` but exits with an error if that environment
variable is not already set. To provide a default value if it is not set, use
`--variable %name=content` or `--variable %name@content`.
Example. Get the USER environment variable into the URL, fail if USER is not
set:
--variable '%USER'
--expand-url = "https://example.com/api/{{USER}}/method"
When expanding variables, curl supports a set of functions that can make the
variable contents more convenient to use. It can trim leading and trailing
white space with `trim`, it can output the contents as a JSON quoted string
with `json`, URL encode the string with `url`, base64 encode it with `b64` and
base64 decode it with `64dec`. To apply functions to a variable expansion, add
them colon separated to the right side of the variable. Variable content
holding null bytes that are not encoded when expanded causes an error.
Example: get the contents of a file called $HOME/.secret into a variable
called "fix". Make sure that the content is trimmed and percent-encoded when
sent as POST data:
--variable %HOME
--expand-variable fix@{{HOME}}/.secret
--expand-data "{{fix:trim:url}}"
https://example.com/
Command line variables and expansions were added in 8.3.0.
+15
View File
@@ -0,0 +1,15 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# VERSION
This man page describes curl `%VERSION`. If you use a later version, chances
are this man page does not fully document it. If you use an earlier version,
this document tries to include version information about which specific
version that introduced changes.
You can always learn which the latest curl version is by running
curl https://curl.se/info
The online version of this man page is always showing the latest incarnation:
https://curl.se/docs/manpage.html
+4
View File
@@ -0,0 +1,4 @@
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# WWW
https://curl.se
@@ -0,0 +1,21 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: abstract-unix-socket
Arg: <path>
Help: Connect via abstract Unix domain socket
Added: 7.53.0
Protocols: HTTP
Category: connection
Multi: single
See-also:
- unix-socket
Example:
- --abstract-unix-socket socketpath $URL
---
# `--abstract-unix-socket`
Connect to the server through an abstract Unix domain socket, instead of using
the network. Note: netstat shows the path of an abstract socket prefixed with
`@`, however the \<path\> argument should not have this leading character.
+28
View File
@@ -0,0 +1,28 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: alt-svc
Arg: <filename>
Protocols: HTTPS
Help: Enable alt-svc with this cache file
Added: 7.64.1
Category: http
Multi: append
See-also:
- resolve
- connect-to
Example:
- --alt-svc svc.txt $URL
---
# `--alt-svc`
Enable the alt-svc parser. If the filename points to an existing alt-svc cache
file, that gets used. After a completed transfer, the cache is saved to the
filename again if it has been modified.
Specify a "" filename (zero length) to avoid loading/saving and make curl just
handle the cache in memory.
If this option is used several times, curl loads contents from all the
files but the last one is used for saving.
+30
View File
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: anyauth
Help: Pick any authentication method
Protocols: HTTP
Category: http proxy auth
Added: 7.10.6
Multi: custom
See-also:
- proxy-anyauth
- basic
- digest
Example:
- --anyauth --user me:pwd $URL
---
# `--anyauth`
Figure out authentication method automatically, and use the most secure one
the remote site claims to support. This is done by first doing a request and
checking the response-headers, thus possibly inducing an extra network
round-trip. This option is used instead of setting a specific authentication
method, which you can do with --basic, --digest, --ntlm, and --negotiate.
Using --anyauth is not recommended if you do uploads from stdin, since it may
require data to be sent twice and then the client must be able to rewind. If
the need should arise when uploading from stdin, the upload operation fails.
Used together with --user.
+23
View File
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Short: a
Long: append
Help: Append to target file when uploading
Protocols: FTP SFTP
Category: ftp sftp
Added: 4.8
Multi: boolean
See-also:
- range
- continue-at
Example:
- --upload-file local --append ftp://example.com/
---
# `--append`
When used in an upload, this option makes curl append to the target file
instead of overwriting it. If the remote file does not exist, it is
created. Note that this flag is ignored by some SFTP servers (including
OpenSSH).
+30
View File
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: aws-sigv4
Protocols: HTTP
Arg: <provider1[:prvdr2[:reg[:srv]]]>
Help: AWS V4 signature auth
Category: auth http
Added: 7.75.0
Multi: single
See-also:
- basic
- user
Example:
- --aws-sigv4 "aws:amz:us-east-2:es" --user "key:secret" $URL
---
# `--aws-sigv4`
Use AWS V4 signature authentication in the transfer.
The provider argument is a string that is used by the algorithm when creating
outgoing authentication headers.
The region argument is a string that points to a geographic area of
a resources collection (region-code) when the region name is omitted from
the endpoint.
The service argument is a string that points to a function provided by a cloud
(service-code) when the service name is omitted from the endpoint.
+23
View File
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: basic
Help: HTTP Basic Authentication
Protocols: HTTP
Category: auth
Added: 7.10.6
Multi: boolean
See-also:
- proxy-basic
Example:
- -u name:password --basic $URL
---
# `--basic`
Use HTTP Basic authentication with the remote host. This method is the default
and this option is usually pointless, unless you use it to override a
previously set option that sets a different authentication method (such as
--ntlm, --digest, or --negotiate).
Used together with --user.
+44
View File
@@ -0,0 +1,44 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ca-native
Help: Load CA certs from the OS
Protocols: TLS
Category: tls
Added: 8.2.0
Multi: boolean
See-also:
- cacert
- capath
- dump-ca-embed
- insecure
- proxy-ca-native
Example:
- --ca-native $URL
---
# `--ca-native`
Use the operating system's native CA store for certificate verification.
This option is independent of other CA certificate locations set at run time or
build time. Those locations are searched in addition to the native CA store.
This option works with OpenSSL and its forks (LibreSSL, BoringSSL, etc) on
Windows (Added in 7.71.0) and on Apple OS when libcurl is built with
Apple SecTrust enabled. (Added in 8.17.0)
This option works with wolfSSL on Windows, Linux (Debian, Ubuntu, Gentoo,
Fedora, RHEL), macOS, Android and iOS. (Added in 8.3.0)
This option works with GnuTLS (Added in 8.5.0) and also uses Apple
SecTrust when libcurl is built with it. (Added in 8.17.0)
This option works with rustls on Windows, macOS, Android and iOS. On Linux it
is equivalent to using the Mozilla CA certificate bundle. When used with rustls
_only_ the native CA store is consulted, not other locations set at run time or
build time. (Added in 8.13.0)
This option currently has no effect for Schannel. This is the native TLS
library from Microsoft, that by default uses the native CA store for
verification unless overridden by a CA certificate location setting.
+40
View File
@@ -0,0 +1,40 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: cacert
Arg: <file>
Help: CA certificate to verify peer against
Protocols: TLS
Category: tls
Added: 7.5
Multi: single
See-also:
- capath
- dump-ca-embed
- insecure
Example:
- --cacert CA-file.txt $URL
---
# `--cacert`
Use the specified certificate file to verify the peer. The file may contain
multiple CA certificates. The certificate(s) must be in PEM format. Normally
curl is built to use a default file for this, so this option is typically used
to alter that default file.
curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is set
and the TLS backend is not Schannel, and uses the given path as a path to a CA
cert bundle. This option overrides that variable.
(Windows) curl automatically looks for a CA certs file named
'curl-ca-bundle.crt', either in the same directory as curl.exe, or in the
Current Working Directory, or in any folder along your PATH.
curl 8.11.0 added a build-time option to disable this search behavior, and
another option to restrict search to the application's directory.
(Schannel) This option is supported for Schannel in Windows 7 or later (added
in 7.60.0). This option is supported for backward compatibility with other SSL
engines; instead it is recommended to use Windows' store of root certificates
(the default for Schannel).
+31
View File
@@ -0,0 +1,31 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: capath
Arg: <dir>
Help: CA directory to verify peer against
Protocols: TLS
Category: tls
Added: 7.9.8
Multi: single
See-also:
- cacert
- dump-ca-embed
- insecure
Example:
- --capath /local/directory $URL
---
# `--capath`
Use the specified certificate directory to verify the peer. If curl is built against
OpenSSL, multiple paths can be provided by separating them with the appropriate platform-specific
separator (e.g. `path1:path2:path3` on Unix-style platforms for `path1;path2;path3` on Windows).
The certificates must be in PEM format, and if curl is built against OpenSSL, the
directory must have been processed using the c_rehash utility supplied with
OpenSSL. Using --capath can allow OpenSSL-powered curl to make SSL-connections
much more efficiently than using --cacert if the --cacert file contains many
CA certificates.
If this option is set, the default capath value is ignored.
+25
View File
@@ -0,0 +1,25 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: cert-status
Protocols: TLS
Added: 7.41.0
Help: Verify server cert status OCSP-staple
Category: tls
Multi: boolean
See-also:
- pinnedpubkey
Example:
- --cert-status $URL
---
# `--cert-status`
Verify the status of the server certificate by using the Certificate Status
Request (aka. OCSP stapling) TLS extension.
If this option is enabled and the server sends an invalid (e.g. expired)
response, if the response suggests that the server certificate has been
revoked, or no response at all is received, the verification fails.
This support is currently only implemented in the OpenSSL and GnuTLS backends.
+26
View File
@@ -0,0 +1,26 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: cert-type
Protocols: TLS
Arg: <type>
Help: Certificate type (DER/PEM/ENG/PROV/P12)
Category: tls
Added: 7.9.3
Multi: single
See-also:
- cert
- key
- key-type
Example:
- --cert-type PEM --cert file $URL
---
# `--cert-type`
Set type of the provided client certificate. PEM, DER, ENG, PROV and P12 are
recognized types.
The default type depends on the TLS backend and is usually PEM. For Schannel
it is P12. If --cert is a pkcs11: URI then ENG or PROV is the default type
(depending on OpenSSL version).
+53
View File
@@ -0,0 +1,53 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Short: E
Long: cert
Arg: <certificate[:password]>
Help: Client certificate file and password
Protocols: TLS
Category: tls
Added: 5.0
Multi: single
See-also:
- cert-type
- key
- key-type
Example:
- --cert certfile --key keyfile $URL
---
# `--cert`
Use the specified client certificate file when getting a file with HTTPS, FTPS
or another SSL-based protocol. The certificate must be PEM format. If the
optional password is not specified, it is queried for on the terminal. Note
that this option assumes a certificate file that is the private key and the
client certificate concatenated. See --cert and --key to specify them
independently.
In the \<certificate\> portion of the argument, you must escape the character
`:` as `\:` so that it is not recognized as the password delimiter. Similarly,
you must escape the double quote character as \" so that it is not recognized
as an escape character.
If curl is built against OpenSSL, and the engine pkcs11 or pkcs11
provider is available, then a PKCS#11 URI (RFC 7512) can be used to specify a
certificate located in a PKCS#11 device. A string beginning with `pkcs11:` is
interpreted as a PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine
option is set as `pkcs11` if none was provided and the --cert-type option is
set as `ENG` or `PROV` if none was provided (depending on OpenSSL version).
If curl is built against GnuTLS, a PKCS#11 URI can be used to specify
a certificate located in a PKCS#11 device. A string beginning with `pkcs11:`
is interpreted as a PKCS#11 URI.
(Schannel) Client certificates must be specified by a path expression to a
certificate store. (Loading *PFX* is not supported; you can import it to a
store first). You can use "\<store location\>\\<store name\>\\<thumbprint\>"
to refer to a certificate in the system certificates store, for example,
*"CurrentUser\MY\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a"*. Thumbprint is
usually a SHA-1 hex string which you can see in certificate details. Following
store locations are supported: *CurrentUser*, *LocalMachine*,
*CurrentService*, *Services*, *CurrentUserGroupPolicy*,
*LocalMachineGroupPolicy* and *LocalMachineEnterprise*.
+25
View File
@@ -0,0 +1,25 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ciphers
Arg: <list>
Help: TLS 1.2 (1.1, 1.0) ciphers to use
Protocols: TLS
Category: tls
Added: 7.9
Multi: single
See-also:
- tls13-ciphers
- proxy-ciphers
- curves
Example:
- --ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256 $URL
---
# `--ciphers`
Specify which cipher suites to use in the connection if it negotiates TLS 1.2
(1.1, 1.0). The list of ciphers suites must specify valid ciphers. Read up on
cipher suite details on this URL:
https://curl.se/docs/ssl-ciphers.html
@@ -0,0 +1,20 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: compressed-ssh
Help: Enable SSH compression
Protocols: SCP SFTP
Added: 7.56.0
Category: scp ssh
Multi: boolean
See-also:
- compressed
Example:
- --compressed-ssh sftp://example.com/
---
# `--compressed-ssh`
Enable SSH compression. This is a request, not an order; the server may or may
not do it. This allows the data to be sent compressed over the wire, and
automatically decompressed in the receiving end, to save bandwidth.
+27
View File
@@ -0,0 +1,27 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: compressed
Help: Request compressed response
Protocols: HTTP
Category: http
Added: 7.10
Multi: boolean
See-also:
- compressed-ssh
Example:
- --compressed $URL
---
# `--compressed`
Request a compressed response using one of the algorithms curl supports, and
automatically decompress the content.
Response headers are not modified when saved, so if they are "interpreted"
separately again at a later point they might appear to be saying that the
content is (still) compressed; while in fact it has already been decompressed.
If this option is used and the server sends an unsupported encoding, curl
reports an error. This is a request, not an order; the server may or may not
deliver data compressed.
+84
View File
@@ -0,0 +1,84 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: config
Arg: <file>
Help: Read config from a file
Short: K
Category: curl
Added: 4.10
Multi: append
See-also:
- disable
Example:
- --config file.txt $URL
---
# `--config`
Specify a text file to read curl arguments from. The command line arguments
found in the text file are used as if they were provided on the command
line.
Options and their parameters must be specified on the same line in the file,
separated by whitespace, colon, or the equals sign. Long option names can
optionally be given in the config file without the initial double dashes and
if so, the colon or equals characters can be used as separators. If the option
is specified with one or two dashes, there can be no colon or equals character
between the option and its parameter.
If the parameter contains whitespace or starts with a colon (:) or equals sign
(=), it must be specified enclosed within double quotes ("like this"). Within
double quotes the following escape sequences are available: \\, \", \t, \n, \r
and \v. A backslash preceding any other letter is ignored.
If the first non-blank column of a config line is a '#' character, that line
is treated as a comment.
Only write one option per physical line in the config file. A single line is
required to be no more than 10 megabytes (since 8.2.0).
Specify the filename to --config as minus "-" to make curl read the file from
stdin.
Note that to be able to specify a URL in the config file, you need to specify
it using the --url option, and not by simply writing the URL on its own
line. So, it could look similar to this:
url = "https://curl.se/docs/"
# --- Example file ---
# this is a comment
url = "example.com"
output = "curlhere.html"
user-agent = "superagent/1.0"
# and fetch another URL too
url = "example.com/docs/manpage.html"
-O
referer = "http://nowhereatall.example.com/"
# --- End of example file ---
When curl is invoked, it (unless --disable is used) checks for a default
config file and uses it if found, even when --config is used. The default
config file is checked for in the following places in this order:
1) **"$CURL_HOME/.curlrc"**
2) **"$XDG_CONFIG_HOME/curlrc"** (Added in 7.73.0)
3) **"$HOME/.curlrc"**
4) Windows: **"%USERPROFILE%\.curlrc"**
5) Windows: **"%APPDATA%\.curlrc"**
6) Windows: **"%USERPROFILE%\Application Data\.curlrc"**
7) Non-Windows: use getpwuid to find the home directory
8) On Windows, if it finds no *.curlrc* file in the sequence described above, it
checks for one in the same directory the curl executable is placed.
On Windows two filenames are checked per location: *.curlrc* and *_curlrc*,
preferring the former. Older versions on Windows checked for *_curlrc* only.
@@ -0,0 +1,28 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: connect-timeout
Arg: <seconds>
Help: Maximum time allowed to connect
Category: connection timeout
Added: 7.7
Multi: single
See-also:
- max-time
Example:
- --connect-timeout 20 $URL
- --connect-timeout 3.14 $URL
---
# `--connect-timeout`
Maximum time in seconds that you allow curl's connection to take. This only
limits the connection phase, so if curl connects within the given period it
continues - if not it exits.
This option accepts decimal values (added in 7.32.0). The decimal value needs
to be provided using a dot (.) as decimal separator - not the local version
even if it might be using another separator.
The connection phase is considered complete when the DNS lookup and requested
TCP, TLS or QUIC handshakes are done.
+40
View File
@@ -0,0 +1,40 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: connect-to
Arg: <HOST1:PORT1:HOST2:PORT2>
Help: Connect to host2 instead of host1
Added: 7.49.0
Category: connection dns
Multi: append
See-also:
- resolve
- header
Example:
- --connect-to example.com:443:example.net:8443 $URL
---
# `--connect-to`
For a request intended for the `HOST1:PORT1` pair, connect to `HOST2:PORT2`
instead. This option is only used to establish the network connection. It does
NOT affect the hostname/port number that is used for TLS/SSL (e.g. SNI,
certificate verification) or for the application protocols.
`HOST1` and `PORT1` may be empty strings, meaning any host or any port number.
`HOST2` and `PORT2` may also be empty strings, meaning use the request's
original hostname and port number.
A hostname specified to this option is compared as a string, so it needs to
match the name used in the request URL. It can be either numerical such as
`127.0.0.1` or the full host name such as `example.org`.
Example: redirect connects from the example.com hostname to 127.0.0.1
independently of port number:
curl --connect-to example.com::127.0.0.1: https://example.com/
Example: redirect connects from all hostnames to 127.0.0.1 independently of
port number:
curl --connect-to ::127.0.0.1: http://example.com/
+37
View File
@@ -0,0 +1,37 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Short: C
Long: continue-at
Arg: <offset>
Help: Resumed transfer offset
Category: connection
Added: 4.8
Multi: single
See-also:
- range
Example:
- -C - $URL
- -C 400 $URL
---
# `--continue-at`
Resume a previous transfer from the given byte offset. The given offset is the
exact number of bytes that are skipped, counting from the beginning of the
source file before it is transferred to the destination. If used with uploads,
the FTP server command SIZE is not used by curl.
Use "-C -" to instruct curl to automatically find out where/how to resume the
transfer. It then uses the given output/input files to figure that out.
When using this option for HTTP uploads using POST or PUT, functionality is
not guaranteed. The HTTP protocol has no standard interoperable resume upload
and curl uses a set of headers for this purpose that once proved working for
some servers and have been left for those who find that useful.
This command line option is mutually exclusive with --range: you can only use
one of them for a single transfer.
The --no-clobber and --remove-on-error options cannot be used together with
--continue-at.
+39
View File
@@ -0,0 +1,39 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Short: c
Long: cookie-jar
Arg: <filename>
Protocols: HTTP
Help: Save cookies to <filename> after operation
Category: http
Added: 7.9
Multi: single
See-also:
- cookie
- junk-session-cookies
Example:
- -c store-here.txt $URL
- -c store-here.txt -b read-these $URL
---
# `--cookie-jar`
Specify to which file you want curl to write all cookies after a completed
operation. curl writes all cookies from its in-memory cookie storage to the
given file at the end of operations. Even if no cookies are known, a file is
created so that it removes any formerly existing cookies from the file. The
file uses the Netscape cookie file format. If you set the filename to a single
minus, "-", the cookies are written to stdout.
The file specified with --cookie-jar is only used for output. No cookies are
read from the file. To read cookies, use the --cookie option. Both options
can specify the same file.
This command line option activates the cookie engine that makes curl record
and use cookies. The --cookie option also activates it.
If the cookie jar cannot be created or written to, the whole curl operation
does not fail or even report an error clearly. Using --verbose gets a warning
displayed, but that is the only visible feedback you get about this possibly
lethal situation.
+62
View File
@@ -0,0 +1,62 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Short: b
Long: cookie
Arg: <data|filename>
Protocols: HTTP
Help: Send cookies from string/load from file
Category: http
Added: 4.9
Multi: append
See-also:
- cookie-jar
- junk-session-cookies
Example:
- -b "" $URL
- -b cookiefile $URL
- -b cookiefile -c cookiefile $URL
- -b name=Jane $URL
---
# `--cookie`
This option has two slightly separate cookie sending functions.
Either: pass the exact data to send to the HTTP server in the Cookie header.
It is supposedly data previously received from the server in a `Set-Cookie:`
line. The data should be in the format `NAME1=VALUE1; NAME2=VALUE2`. When
given a set of specific cookies, curl populates its cookie header with this
content explicitly in all outgoing request(s). If multiple requests are done
due to authentication, followed redirects or similar, they all get this cookie
header passed on.
Or: If no `=` symbol is used in the argument, it is instead treated as a
filename to read previously stored cookie from. This option also activates the
cookie engine which makes curl record incoming cookies, which may be handy if
you are using this in combination with the --location option or do multiple
URL transfers on the same invoke.
If the filename is a single minus ("-"), curl reads the contents from stdin.
If the filename is an empty string ("") and is the only cookie input, curl
activates the cookie engine without any cookies.
The file format of the file to read cookies from should be plain HTTP headers
(Set-Cookie style) or the Netscape/Mozilla cookie file format.
The file specified with --cookie is only used as input. No cookies are written
to that file. To store cookies, use the --cookie-jar option.
If you use the Set-Cookie file format and do not specify a domain then the
cookie is not sent since the domain never matches. To address this, set a
domain in Set-Cookie line (doing that includes subdomains) or preferably: use
the Netscape format.
Users often want to both read cookies from a file and write updated cookies
back to a file, so using both --cookie and --cookie-jar in the same command
line is common.
If curl is built with PSL (**Public Suffix List**) support, it detects and
discards cookies that are specified for such suffix domains that should not be
allowed to have cookies. If curl is *not* built with PSL support, it has no
ability to stop super cookies.
+26
View File
@@ -0,0 +1,26 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: create-dirs
Help: Create necessary local directory hierarchy
Category: output
Added: 7.10.3
Multi: boolean
See-also:
- ftp-create-dirs
- output-dir
Example:
- --create-dirs --output local/dir/file $URL
---
# `--create-dirs`
When used in conjunction with the --output option, curl creates the necessary
local directory hierarchy as needed. This option creates the directories
mentioned with the --output option combined with the path possibly set with
--output-dir. If the combined output filename uses no directory, or if the
directories it mentions already exist, no directories are created.
Created directories are made with mode 0750 on Unix-style file systems.
To create remote directories when using FTP or SFTP, try --ftp-create-dirs.
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: create-file-mode
Arg: <mode>
Help: File mode for created files
Protocols: SFTP SCP FILE
Category: sftp scp file upload
Added: 7.75.0
Multi: single
See-also:
- ftp-create-dirs
Example:
- --create-file-mode 0777 -T localfile sftp://example.com/new
---
# `--create-file-mode`
When curl is used to create files remotely using one of the supported
protocols, this option allows the user to set which 'mode' to set on the file
at creation time, instead of the default 0644.
This option takes an octal number as argument.
+19
View File
@@ -0,0 +1,19 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: crlf
Help: Convert LF to CRLF in upload
Protocols: FTP SMTP
Category: ftp smtp
Added: 5.7
Multi: boolean
See-also:
- use-ascii
Example:
- --crlf -T file ftp://example.com/
---
# `--crlf`
Convert line feeds to carriage return plus line feeds in upload. Useful for
**MVS (OS/390)**.
+21
View File
@@ -0,0 +1,21 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: crlfile
Arg: <file>
Protocols: TLS
Help: Certificate Revocation list
Added: 7.19.7
Category: tls
Multi: single
See-also:
- cacert
- capath
Example:
- --crlfile rejects.txt $URL
---
# `--crlfile`
Provide a file using PEM format with a Certificate Revocation List that may
specify peer certificates that are to be considered revoked.
+28
View File
@@ -0,0 +1,28 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: curves
Arg: <list>
Help: (EC) TLS key exchange algorithms to request
Protocols: TLS
Added: 7.73.0
Category: tls
Multi: single
See-also:
- ciphers
Example:
- --curves X25519 $URL
---
# `--curves`
Set specific curves to use during SSL session establishment according to RFC
8422, 5.1. Multiple algorithms can be provided by separating them with `:`
(e.g. `X25519:P-521`). The parameter is available identically in the OpenSSL
`s_client` and `s_server` utilities.
--curves allows a OpenSSL powered curl to make SSL-connections with exactly
the (EC) curve requested by the client, avoiding nontransparent client/server
negotiations.
If this option is set, the default curves list built into OpenSSL are ignored.
+21
View File
@@ -0,0 +1,21 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: data-ascii
Arg: <data>
Help: HTTP POST ASCII data
Protocols: HTTP
Category: http post upload
Added: 7.2
Multi: append
See-also:
- data-binary
- data-raw
- data-urlencode
Example:
- --data-ascii @file $URL
---
# `--data-ascii`
This option is just an alias for --data.
+32
View File
@@ -0,0 +1,32 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: data-binary
Arg: <data>
Help: HTTP POST binary data
Protocols: HTTP
Category: http post upload
Added: 7.2
Multi: append
See-also:
- data-ascii
Example:
- --data-binary @filename $URL
---
# `--data-binary`
Post data exactly as specified with no extra processing whatsoever.
If you start the data with the letter @, the rest should be a filename.
`@-` makes curl read the data from stdin. Data is posted in a similar
manner as --data does, except that newlines and carriage returns are
preserved and conversions are never done.
Like --data the default content-type sent to the server is
application/x-www-form-urlencoded. If you want the data to be treated as
arbitrary binary data by the server then set the content-type to octet-stream:
-H "Content-Type: application/octet-stream".
If this option is used several times, the ones following the first append
data as described in --data.
+21
View File
@@ -0,0 +1,21 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: data-raw
Arg: <data>
Protocols: HTTP
Help: HTTP POST data, '@' allowed
Added: 7.43.0
Category: http post upload
Multi: append
See-also:
- data
Example:
- --data-raw "hello" $URL
- --data-raw "@at@at@" $URL
---
# `--data-raw`
Post data similarly to --data but without the special interpretation of the @
character.
@@ -0,0 +1,51 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: data-urlencode
Arg: <data>
Help: HTTP POST data URL encoded
Protocols: HTTP
Added: 7.18.0
Category: http post upload
Multi: append
See-also:
- data
- data-raw
Example:
- --data-urlencode name=val $URL
- --data-urlencode =encodethis $URL
- --data-urlencode name@file $URL
- --data-urlencode @fileonly $URL
---
# `--data-urlencode`
Post data, similar to the other --data options with the exception that this
performs URL-encoding.
To be CGI-compliant, the \<data\> part should begin with a *name* followed by
a separator and a content specification. The \<data\> part can be passed to
curl using one of the following syntaxes:
## content
URL-encode the content and pass that on. Just be careful so that the content
does not contain any `=` or `@` symbols, as that makes the syntax match one of
the other cases below.
## =content
URL-encode the content and pass that on. The preceding `=` symbol is not
included in the data.
## name=content
URL-encode the content part and pass that on. Note that the name part is
expected to be URL-encoded already.
## @filename
load data from the given file (including any newlines), URL-encode that data
and pass it on in the POST. Using `@-` makes curl read the data from stdin.
## name@filename
load data from the given file (including any newlines), URL-encode that data
and pass it on in the POST. The name part gets an equal sign appended,
resulting in *name=urlencoded-file-content*. Note that the name is expected to
be URL-encoded already.
+49
View File
@@ -0,0 +1,49 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: data
Short: d
Arg: <data>
Help: HTTP POST data
Protocols: HTTP MQTT
Mutexed: form head upload-file
Category: important http post upload
Added: 4.0
Multi: append
See-also:
- data-binary
- data-urlencode
- data-raw
Example:
- -d "name=curl" $URL
- -d "name=curl" -d "tool=cmdline" $URL
- -d @filename $URL
---
# `--data`
Send the specified data in a POST request to the HTTP server, in the same way
that a browser does when a user has filled in an HTML form and presses the
submit button. This option makes curl pass the data to the server using the
content-type application/x-www-form-urlencoded. Compared to --form.
--data-raw is almost the same but does not have a special interpretation of
the @ character. To post data purely binary, you should instead use the
--data-binary option. To URL-encode the value of a form field you may use
--data-urlencode.
If any of these options is used more than once on the same command line, the
data pieces specified are merged with a separating &-symbol. Thus, using
'-d name=daniel -d skill=lousy' would generate a post chunk that looks like
'name=daniel&skill=lousy'.
If you start the data with the letter @, the rest should be a filename to read
the data from, or - if you want curl to read the data from stdin. Posting data
from a file named 'foobar' would thus be done with --data @foobar. When --data
is told to read from a file like that, carriage returns, newlines and null
bytes are stripped out. If you do not want the @ character to have a special
interpretation use --data-raw instead.
The data for this option is passed on to the server exactly as provided on the
command line. curl does not convert, change or improve it. It is up to the
user to provide the data in the correct form.
+30
View File
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: delegation
Arg: <LEVEL>
Help: GSS-API delegation permission
Protocols: GSS/kerberos
Category: auth
Added: 7.22.0
Multi: single
See-also:
- insecure
- ssl
Example:
- --delegation "none" $URL
---
# `--delegation`
Set LEVEL what curl is allowed to delegate when it comes to user credentials.
## none
Do not allow any delegation.
## policy
Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
service ticket, which is a matter of realm policy.
## always
Unconditionally allow the server to delegate.
+22
View File
@@ -0,0 +1,22 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: digest
Help: HTTP Digest Authentication
Protocols: HTTP
Category: proxy auth http
Added: 7.10.6
Multi: boolean
See-also:
- user
- proxy-digest
- anyauth
Example:
- -u name:password --digest $URL
---
# `--digest`
Enable HTTP Digest authentication. This authentication scheme avoids sending
the password over the wire in clear text. Use this in combination with the
normal --user option to set username and password.
+32
View File
@@ -0,0 +1,32 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: disable-eprt
Help: Inhibit using EPRT or LPRT
Protocols: FTP
Category: ftp
Added: 7.10.5
Multi: boolean
See-also:
- disable-epsv
- ftp-port
Example:
- --disable-eprt ftp://example.com/
---
# `--disable-eprt`
Disable the use of the EPRT and LPRT commands when doing active FTP transfers.
curl normally first attempts to use EPRT before using PORT, but with this
option, it uses PORT right away. EPRT is an extension to the original FTP
protocol, and does not work on all servers, but enables more functionality in
a better way than the traditional PORT command.
--eprt can be used to explicitly enable EPRT again and --no-eprt is an alias
for --disable-eprt.
If the server is accessed using IPv6, this option has no effect as EPRT is
necessary then.
Disabling EPRT only changes the active behavior. If you want to switch to
passive mode you need to not use --ftp-port or force it with --ftp-pasv.
+30
View File
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: disable-epsv
Help: Inhibit using EPSV
Protocols: FTP
Category: ftp
Added: 7.9.2
Multi: boolean
See-also:
- disable-eprt
- ftp-port
Example:
- --disable-epsv ftp://example.com/
---
# `--disable-epsv`
Disable the use of the EPSV command when doing passive FTP transfers. curl
normally first attempts to use EPSV before PASV, but with this option, it does
not try EPSV.
--epsv can be used to explicitly enable EPSV again and --no-epsv is an alias
for --disable-epsv.
If the server is an IPv6 host, this option has no effect as EPSV is necessary
then.
Disabling EPSV only changes the passive behavior. If you want to switch to
active mode you need to use --ftp-port.
+20
View File
@@ -0,0 +1,20 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: disable
Short: q
Help: Disable .curlrc
Category: curl
Added: 5.0
Multi: boolean
See-also:
- config
Example:
- -q $URL
---
# `--disable`
If used as the **first** parameter on the command line, the *curlrc* config
file is not read or used. See the --config for details on the default config
file search path.
@@ -0,0 +1,21 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: disallow-username-in-url
Help: Disallow username in URL
Added: 7.61.0
Category: curl
Multi: boolean
See-also:
- proto
Example:
- --disallow-username-in-url $URL
---
# `--disallow-username-in-url`
Exit with error if passed a URL containing a username. Probably most useful
when the URL is being provided at runtime or similar.
Accepting and using credentials in a URL is normally considered a security
hazard as they are easily leaked that way.
+23
View File
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: dns-interface
Arg: <interface>
Help: Interface to use for DNS requests
Protocols: DNS
Added: 7.33.0
Requires: c-ares
Category: dns
Multi: single
See-also:
- dns-ipv4-addr
- dns-ipv6-addr
Example:
- --dns-interface eth0 $URL
---
# `--dns-interface`
Send outgoing DNS requests through the given interface. This option is a
counterpart to --interface (which does not affect DNS). The supplied string
must be an interface name (not an address).
+23
View File
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: dns-ipv4-addr
Arg: <address>
Help: IPv4 address to use for DNS requests
Protocols: DNS
Added: 7.33.0
Requires: c-ares
Category: dns
Multi: single
See-also:
- dns-interface
- dns-ipv6-addr
Example:
- --dns-ipv4-addr 10.1.2.3 $URL
---
# `--dns-ipv4-addr`
Bind to a specific IP address when making IPv4 DNS requests, so that the DNS
requests originate from this address. The argument should be a single IPv4
address.
+23
View File
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: dns-ipv6-addr
Arg: <address>
Help: IPv6 address to use for DNS requests
Protocols: DNS
Added: 7.33.0
Requires: c-ares
Category: dns
Multi: single
See-also:
- dns-interface
- dns-ipv4-addr
Example:
- --dns-ipv6-addr 2a04:4e42::561 $URL
---
# `--dns-ipv6-addr`
Bind to a specific IP address when making IPv6 DNS requests, so that the DNS
requests originate from this address. The argument should be a single IPv6
address.
+24
View File
@@ -0,0 +1,24 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: dns-servers
Arg: <addresses>
Help: DNS server addrs to use
Protocols: DNS
Requires: c-ares
Added: 7.33.0
Category: dns
Multi: single
See-also:
- dns-interface
- dns-ipv4-addr
Example:
- --dns-servers 192.168.0.1,192.168.0.2 $URL
- --dns-servers 10.0.0.1:53 $URL
---
# `--dns-servers`
Set the list of DNS servers to be used instead of the system default. The list
of IP addresses should be separated with commas. Port numbers may also
optionally be given, appended to the IP address separated with a colon.
@@ -0,0 +1,27 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: doh-cert-status
Help: Verify DoH server cert status OCSP-staple
Added: 7.76.0
Category: dns tls
Protocols: DNS
Multi: boolean
See-also:
- doh-insecure
Example:
- --doh-cert-status --doh-url https://doh.example $URL
---
# `--doh-cert-status`
Same as --cert-status but used for DoH (DNS-over-HTTPS).
Verify the status of the DoH servers' certificate by using the Certificate
Status Request (aka. OCSP stapling) TLS extension.
If this option is enabled and the DoH server sends an invalid (e.g. expired)
response, if the response suggests that the server certificate has been
revoked, or no response at all is received, the verification fails.
This support is currently only implemented in the OpenSSL and GnuTLS backends.
+28
View File
@@ -0,0 +1,28 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: doh-insecure
Help: Allow insecure DoH server connections
Added: 7.76.0
Category: dns tls
Protocols: DNS
Multi: boolean
See-also:
- doh-url
- insecure
- proxy-insecure
Example:
- --doh-insecure --doh-url https://doh.example $URL
---
# `--doh-insecure`
By default, every connection curl makes to a DoH server is verified to be
secure before the transfer takes place. This option tells curl to skip the
verification step and proceed without checking.
**WARNING**: using this option makes the DoH transfer and name resolution
insecure.
This option is equivalent to --insecure and --proxy-insecure but used for DoH
(DNS-over-HTTPS) only.
+31
View File
@@ -0,0 +1,31 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: doh-url
Arg: <URL>
Help: Resolve hostnames over DoH
Added: 7.62.0
Category: dns
Protocols: DNS
Multi: single
See-also:
- doh-insecure
Example:
- --doh-url https://doh.example $URL
- --doh-url https://doh.example --resolve doh.example:443:192.0.2.1 $URL
---
# `--doh-url`
Specify which DNS-over-HTTPS (DoH) server to use to resolve hostnames, instead
of using the default name resolver mechanism. The URL must be HTTPS.
Some SSL options that you set for your transfer also apply to DoH since the
name lookups take place over SSL. However, the certificate verification
settings are not inherited but are controlled separately via --doh-insecure
and --doh-cert-status.
By default, DoH is bypassed when initially looking up DNS records of the DoH server. You can specify the IP address(es) of the DoH server with --resolve to avoid this.
This option is unset if an empty string "" is used as the URL.
(Added in 7.85.0)
+25
View File
@@ -0,0 +1,25 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: dump-ca-embed
Help: Write the embedded CA bundle to standard output
Protocols: TLS
Category: http proxy tls
Added: 8.10.0
Multi: boolean
See-also:
- ca-native
- cacert
- capath
- proxy-ca-native
- proxy-cacert
- proxy-capath
Example:
- --dump-ca-embed
---
# `--dump-ca-embed`
Write the CA bundle embedded in curl to standard output, then quit.
If curl was not built with a default CA bundle embedded, the output is empty.
+35
View File
@@ -0,0 +1,35 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: dump-header
Short: D
Arg: <filename>
Help: Write the received headers to <filename>
Protocols: HTTP FTP
Category: http ftp
Added: 5.7
Multi: single
See-also:
- output
Example:
- --dump-header store.txt $URL
- --dump-header - $URL -o save
---
# `--dump-header`
Write the received protocol headers to the specified file. If no headers are
received, the use of this option creates an empty file. Specify `-` as
filename (a single minus) to have it written to stdout.
Starting in curl 8.10.0, specify `%` (a single percent sign) as filename
writes the output to stderr.
When used in FTP, the FTP server response lines are considered being "headers"
and thus are saved there.
Starting in curl 8.11.0, using the --create-dirs option can also create
missing directory components for the path provided in --dump-header.
Having multiple transfers in one set of operations (i.e. the URLs in one
--next clause), appends them to the same file, separated by a blank line.
+52
View File
@@ -0,0 +1,52 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ech
Arg: <config>
Help: Configure ECH
Added: 8.8.0
Category: tls
Protocols: HTTPS
Multi: single
See-also:
- doh-url
Example:
- --ech true $URL
---
# `--ech`
Specify how to do ECH (Encrypted Client Hello).
The values allowed for \<config\> can be:
## `false`
Do not attempt ECH. The is the default.
## `grease`
Send a GREASE ECH extension
## `true`
Attempt ECH if possible, but do not fail if ECH is not attempted.
(The connection fails if ECH is attempted but fails.)
## `hard`
Attempt ECH and fail if that is not possible. ECH only works with TLS 1.3 and
also requires using DoH or providing an ECHConfigList on the command line.
## `ecl:<b64val>`
A base64 encoded ECHConfigList that is used for ECH.
## `pn:<name>`
A name to use to over-ride the `public_name` field of an ECHConfigList (only
available with OpenSSL TLS support)
##
Most ECH related errors cause error *CURLE_ECH_REQUIRED* (101).
+23
View File
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: egd-file
Arg: <file>
Help: EGD socket path for random data
Protocols: TLS
Category: deprecated
Added: 7.7
Multi: single
See-also:
- random-file
Example:
- --egd-file /random/here $URL
---
# `--egd-file`
Deprecated option (added in 7.84.0). Prior to that it only had an effect on
curl if built to use old versions of OpenSSL.
Specify the path name to the Entropy Gathering Daemon socket. The socket is
used to seed the random engine for SSL connections.
+25
View File
@@ -0,0 +1,25 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: engine
Arg: <name>
Help: Crypto engine to use
Protocols: TLS
Category: tls
Added: 7.9.3
Multi: single
See-also:
- ciphers
- curves
Example:
- --engine flavor $URL
---
# `--engine`
Select the OpenSSL crypto engine to use for cipher operations. Use `--engine
list` to print a list of build-time supported engines. Note that not all (and
possibly none) of the engines may be available at runtime.
The OpenSSL concept "engines" has been superseded by "providers" in OpenSSL 3,
and this option should work fine to specify such as well.
+30
View File
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: etag-compare
Arg: <file>
Help: Load ETag from file
Protocols: HTTP
Added: 7.68.0
Category: http
Multi: single
See-also:
- etag-save
- time-cond
Example:
- --etag-compare etag.txt $URL
---
# `--etag-compare`
Make a conditional HTTP request for the specific ETag read from the given file
by sending a custom If-None-Match header using the stored ETag.
For correct results, make sure that the specified file contains only a single
line with the desired ETag. A non-existing or empty file is treated as an
empty ETag.
Use the option --etag-save to first save the ETag from a response, and then
use this option to compare against the saved ETag in a subsequent request.
Use this option with a single URL only.
+30
View File
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: etag-save
Arg: <file>
Help: Parse incoming ETag and save to a file
Protocols: HTTP
Added: 7.68.0
Category: http
Multi: single
See-also:
- etag-compare
Example:
- --etag-save storetag.txt $URL
---
# `--etag-save`
Save an HTTP ETag to the specified file. An ETag is a caching related header,
usually returned in a response. Use this option with a single URL only.
If no ETag is sent by the server, an empty file is created.
In many situations you want to use an existing etag in the request to avoid
downloading the same resource again but also save the new etag if it has
indeed changed, by using both etag options --etag-save and --etag-compare with
the same filename, in the same command line.
Starting in curl 8.12.0, using the --create-dirs option can also create
missing directory components for the path provided in --etag-save.
@@ -0,0 +1,25 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: expect100-timeout
Arg: <seconds>
Help: How long to wait for 100-continue
Protocols: HTTP
Added: 7.47.0
Category: http timeout
Multi: single
See-also:
- connect-timeout
Example:
- --expect100-timeout 2.5 -T file $URL
---
# `--expect100-timeout`
Maximum time in seconds that you allow curl to wait for a 100-continue
response when curl emits an Expects: 100-continue header in its request. By
default curl waits one second. This option accepts decimal values. When curl
stops waiting, it continues as if a response was received.
The decimal value needs to be provided using a dot (`.`) as decimal separator -
not the local version even if it might be using another separator.
+32
View File
@@ -0,0 +1,32 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: fail-early
Help: Fail on first transfer error
Added: 7.52.0
Category: curl global
Multi: boolean
Scope: global
See-also:
- fail
- fail-with-body
Example:
- --fail-early $URL https://two.example
---
# `--fail-early`
Fail and exit on the first detected transfer error.
When curl is used to do multiple transfers on the command line, it attempts to
operate on each given URL, one by one. By default, it ignores errors if there
are more URLs given and the last URL's success determines the error code curl
returns. Early failures are "hidden" by subsequent successful transfers.
Using this option, curl instead returns an error on the first transfer that
fails, independent of the amount of URLs that are given on the command
line. This way, no transfer failures go undetected by scripts and similar.
This option does not imply --fail, which causes transfers to fail due to the
server's HTTP status code. You can combine the two options, however note --fail
is not global and is therefore contained by --next.
@@ -0,0 +1,27 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: fail-with-body
Protocols: HTTP
Help: Fail on HTTP errors but save the body
Category: http output
Added: 7.76.0
Mutexed: fail
Multi: boolean
See-also:
- fail
- fail-early
Example:
- --fail-with-body $URL
---
# `--fail-with-body`
Return an error on server errors where the HTTP response code is 400 or
greater). In normal cases when an HTTP server fails to deliver a document, it
returns an HTML document stating so (which often also describes why and more).
This option allows curl to output and save that content but also to return
error 22.
This is an alternative option to --fail which makes curl fail for the same
circumstances but without saving the content.
+35
View File
@@ -0,0 +1,35 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: fail
Short: f
Protocols: HTTP
Help: Fail fast with no output on HTTP errors
Category: important http
Mutexed: fail-with-body
Added: 4.0
Multi: boolean
See-also:
- fail-with-body
- fail-early
Example:
- --fail $URL
---
# `--fail`
Fail with error code 22 and with no response body output at all for HTTP
transfers returning HTTP response codes at 400 or greater.
In normal cases when an HTTP server fails to deliver a document, it returns a
body of text stating so (which often also describes why and more) and a 4xx
HTTP response code. This command line option prevents curl from outputting
that data and instead returns error 22 early. By default, curl does not
consider HTTP response codes to indicate failure.
To get both the error code and also save the content, use --fail-with-body
instead.
This method is not fail-safe and there are occasions where non-successful
response codes slip through, especially when authentication is involved
(response codes 401 and 407).
+22
View File
@@ -0,0 +1,22 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: false-start
Help: Enable TLS False Start
Protocols: TLS
Added: 7.42.0
Category: deprecated
Multi: boolean
See-also:
- tcp-fastopen
Example:
- --false-start $URL
---
# `--false-start`
No TLS backend currently supports this feature.
Use false start during the TLS handshake. False start is a mode where a TLS
client starts sending application data before verifying the server's Finished
message, thus saving a round trip when performing a full handshake.
+30
View File
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: follow
Help: Follow redirects per spec
Category: http
Protocols: HTTP
Added: 8.16.0
Multi: boolean
See-also:
- request
- location
- proto-redir
- max-redirs
Example:
- -X POST --follow $URL
---
# `--follow`
Instructs curl to follow HTTP redirects and to do the custom request method
set with --request when following redirects as the HTTP specification says.
The method string set with --request is used in subsequent requests for the
status codes 307 or 308, but may be reset to GET for 301, 302 and 303.
This is subtly different than --location, as that option always set the custom
method in all subsequent requests independent of response code.
Restrict which protocols a redirect is accepted to follow with --proto-redir.
+19
View File
@@ -0,0 +1,19 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: form-escape
Help: Escape form fields using backslash
Protocols: HTTP IMAP SMTP
Added: 7.81.0
Category: http upload post
Multi: single
See-also:
- form
Example:
- --form-escape -F 'field\name=curl' -F 'file=@load"this' $URL
---
# `--form-escape`
Pass on names of multipart form fields and files using backslash-escaping
instead of percent-encoding.
+23
View File
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: form-string
Help: Specify multipart MIME data
Protocols: HTTP SMTP IMAP
Arg: <name=string>
Category: http upload post smtp imap
Added: 7.13.2
Multi: append
See-also:
- form
Example:
- --form-string "name=data" $URL
---
# `--form-string`
Similar to --form except that the value string for the named parameter is used
literally. Leading @ and \< characters, and the `;type=` string in the value
have no special meaning. Use this in preference to --form if there is any
possibility that the string value may accidentally trigger the @ or \<
features of --form.
+143
View File
@@ -0,0 +1,143 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: form
Short: F
Arg: <name=content>
Help: Specify multipart MIME data
Protocols: HTTP SMTP IMAP
Mutexed: data head upload-file
Category: http upload post imap smtp
Added: 5.0
Multi: append
See-also:
- data
- form-string
- form-escape
Example:
- --form "name=curl" --form "file=@loadthis" $URL
---
# `--form`
For the HTTP protocol family, emulate a filled-in form in which a user has
pressed the submit button. This makes curl POST data using the Content-Type
multipart/form-data according to RFC 2388.
For SMTP and IMAP protocols, this composes a multipart mail message to
transmit.
This enables uploading of binary files etc. To force the 'content' part to be
a file, prefix the filename with an @ sign. To just get the content part from
a file, prefix the filename with the symbol \<. The difference between @ and
\< is then that @ makes a file get attached in the post as a file upload,
while the \< makes a text field and just gets the contents for that text field
from a file.
Read content from stdin instead of a file by using a single "-" as filename.
This goes for both @ and \< constructs. When stdin is used, the contents is
buffered in memory first by curl to determine its size and allow a possible
resend. Defining a part's data from a named non-regular file (such as a named
pipe or similar) is not subject to buffering and is instead read at
transmission time; since the full size is unknown before the transfer starts,
such data is sent as chunks by HTTP and rejected by IMAP.
Example: send an image to an HTTP server, where 'profile' is the name of the
form-field to which the file **portrait.jpg** is the input:
curl -F profile=@portrait.jpg https://example.com/upload.cgi
Example: send your name and shoe size in two text fields to the server:
curl -F name=John -F shoesize=11 https://example.com/
Example: send your essay in a text field to the server. Send it as a plain
text field, but get the contents for it from a local file:
curl -F "story=<hugefile.txt" https://example.com/
You can also instruct curl what Content-Type to use by using `type=`, in a
manner similar to:
curl -F "web=@index.html;type=text/html" example.com
or
curl -F "name=daniel;type=text/foo" example.com
You can also explicitly change the name field of a file upload part by setting
filename=, like this:
curl -F "file=@localfile;filename=nameinpost" example.com
If filename/path contains ',' or ';', it must be quoted by double-quotes like:
curl -F "file=@\"local,file\";filename=\"name;in;post\"" \
https://example.com
or
curl -F 'file=@"local,file";filename="name;in;post"' \
https://example.com
Note that if a filename/path is quoted by double-quotes, any double-quote
or backslash within the filename must be escaped by backslash.
Quoting must also be applied to non-file data if it contains semicolons,
leading/trailing spaces or leading double quotes:
curl -F 'colors="red; green; blue";type=text/x-myapp' \
https://example.com
You can add custom headers to the field by setting headers=, like
curl -F "submit=OK;headers=\"X-submit-type: OK\"" example.com
or
curl -F "submit=OK;headers=@headerfile" example.com
The headers= keyword may appear more than once and above notes about quoting
apply. When headers are read from a file, empty lines and lines starting
with '#' are ignored; each header can be folded by splitting
between two words and starting the continuation line with a space; embedded
carriage-returns and trailing spaces are stripped.
Here is an example of a header file contents:
# This file contains two headers.
X-header-1: this is a header
# The following header is folded.
X-header-2: this is
another header
To support sending multipart mail messages, the syntax is extended as follows:
- name can be omitted: the equal sign is the first character of the argument,
- if data starts with '(', this signals to start a new multipart: it can be
followed by a content type specification.
- a multipart can be terminated with a '=)' argument.
Example: the following command sends an SMTP mime email consisting in an
inline part in two alternative formats: plain text and HTML. It attaches a
text file:
curl -F '=(;type=multipart/alternative' \
-F '=plain text message' \
-F '= <body>HTML message</body>;type=text/html' \
-F '=)' -F '=@textfile.txt' ... smtp://example.com
Data can be encoded for transfer using encoder=. Available encodings are
*binary* and *8bit* that do nothing else than adding the corresponding
Content-Transfer-Encoding header, *7bit* that only rejects 8-bit characters
with a transfer error, *quoted-printable* and *base64* that encodes data
according to the corresponding schemes, limiting lines length to 76
characters.
Example: send multipart mail with a quoted-printable text message and a
base64 attached file:
curl -F '=text message;encoder=quoted-printable' \
-F '=@localfile;encoder=base64' ... smtp://example.com
+20
View File
@@ -0,0 +1,20 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-account
Arg: <data>
Help: Account data string
Protocols: FTP
Added: 7.13.0
Category: ftp auth
Multi: single
See-also:
- user
Example:
- --ftp-account "mr.robot" ftp://example.com/
---
# `--ftp-account`
When an FTP server asks for "account data" after username and password has
been provided, this data is sent off using the ACCT command.
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-alternative-to-user
Arg: <command>
Help: String to replace USER [name]
Protocols: FTP
Added: 7.15.5
Category: ftp
Multi: single
See-also:
- ftp-account
- user
Example:
- --ftp-alternative-to-user "U53r" ftp://example.com
---
# `--ftp-alternative-to-user`
If authenticating with the USER and PASS commands fails, send this command.
When connecting to Tumbleweed's Secure Transport server over FTPS using a
client certificate, using "SITE AUTH" tells the server to retrieve the
username from the certificate.
@@ -0,0 +1,20 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-create-dirs
Protocols: FTP SFTP
Help: Create the remote dirs if not present
Category: ftp sftp
Added: 7.10.7
Multi: boolean
See-also:
- create-dirs
Example:
- --ftp-create-dirs -T file ftp://example.com/remote/path/file
---
# `--ftp-create-dirs`
When an FTP or SFTP URL/operation uses a path that does not currently exist on
the server, the standard behavior of curl is to fail. Using this option, curl
instead attempts to create missing directories.
+36
View File
@@ -0,0 +1,36 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-method
Arg: <method>
Help: Control CWD usage
Protocols: FTP
Added: 7.15.1
Category: ftp
Multi: single
See-also:
- list-only
Example:
- --ftp-method multicwd ftp://example.com/dir1/dir2/file
- --ftp-method nocwd ftp://example.com/dir1/dir2/file
- --ftp-method singlecwd ftp://example.com/dir1/dir2/file
---
# `--ftp-method`
Control what method curl should use to reach a file on an FTP(S)
server. The method argument should be one of the following alternatives:
## multicwd
Do a single CWD operation for each path part in the given URL. For deep
hierarchies this means many commands. This is how RFC 1738 says it should be
done. This is the default but the slowest behavior.
## nocwd
Do no CWD at all. curl does SIZE, RETR, STOR etc and gives the full path to
the server for each of these commands. This is the fastest behavior.
## singlecwd
Do one CWD with the full target directory and then operate on the file
"normally" (like in the multicwd case). This is somewhat more standards
compliant than `nocwd` but without the full penalty of `multicwd`.
+27
View File
@@ -0,0 +1,27 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-pasv
Help: Send PASV/EPSV instead of PORT
Protocols: FTP
Added: 7.11.0
Category: ftp
Multi: mutex
Mutexed: ftp-port
See-also:
- disable-epsv
Example:
- --ftp-pasv ftp://example.com/
---
# `--ftp-pasv`
Use passive mode for the data connection. Passive is the internal default
behavior, but using this option can be used to override a previous --ftp-port
option.
Reversing an enforced passive really is not doable but you must then instead
enforce the correct --ftp-port again.
Passive mode means that curl tries the EPSV command first and then PASV,
unless --disable-epsv is used.
+51
View File
@@ -0,0 +1,51 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-port
Arg: <address>
Help: Send PORT instead of PASV
Short: P
Protocols: FTP
Category: ftp
Added: 4.0
Multi: single
See-also:
- ftp-pasv
- disable-eprt
Example:
- -P - ftp:/example.com
- -P eth0 ftp:/example.com
- -P 192.168.0.2 ftp:/example.com
---
# `--ftp-port`
Reverse the default initiator/listener roles when connecting with FTP. This
option makes curl use active mode. curl then commands the server to connect
back to the client's specified address and port, while passive mode asks the
server to setup an IP address and port for it to connect to. \<address\>
should be one of:
## interface
e.g. **eth0** to specify which interface's IP address you want to use (Unix only)
## IP address
e.g. **192.168.10.1** to specify the exact IP address
## hostname
e.g. **my.host.domain** to specify the machine
## -
make curl pick the same IP address that is already used for the control
connection. This is the recommended choice.
##
Disable the use of PORT with --ftp-pasv. Disable the attempt to use the EPRT
command instead of PORT by using --disable-eprt. EPRT is really PORT++.
You can also append ":[start]-[end]" to the right of the address, to tell
curl what TCP port range to use. That means you specify a port range, from a
lower to a higher number. A single number works as well, but do note that it
increases the risk of failure since the port may not be available.
(Added in 7.19.5)
+21
View File
@@ -0,0 +1,21 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-pret
Help: Send PRET before PASV
Protocols: FTP
Added: 7.20.0
Category: ftp
Multi: boolean
See-also:
- ftp-port
- ftp-pasv
Example:
- --ftp-pret ftp://example.com/
---
# `--ftp-pret`
Send a PRET command before PASV (and EPSV). Certain FTP servers, mainly
drftpd, require this non-standard command for directory listings as well as up
and downloads in PASV mode.
@@ -0,0 +1,24 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-skip-pasv-ip
Help: Skip the IP address for PASV
Protocols: FTP
Added: 7.15.0
Category: ftp
Multi: boolean
See-also:
- ftp-pasv
Example:
- --ftp-skip-pasv-ip ftp://example.com/
---
# `--ftp-skip-pasv-ip`
Do not use the IP address the server suggests in its response to curl's PASV
command when curl connects the data connection. Instead curl reuses the same
IP address it already uses for the control connection.
This option is enabled by default (added in 7.74.0).
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
@@ -0,0 +1,22 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-ssl-ccc-mode
Arg: <active/passive>
Help: Set CCC mode
Protocols: FTP
Added: 7.16.2
Category: ftp tls
Multi: boolean
See-also:
- ftp-ssl-ccc
Example:
- --ftp-ssl-ccc-mode active --ftp-ssl-ccc ftps://example.com/
---
# `--ftp-ssl-ccc-mode`
Set the CCC mode. The passive mode does not initiate the shutdown, but instead
waits for the server to do it, and does not reply to the shutdown from the
server. The active mode initiates the shutdown and waits for a reply from the
server.
+22
View File
@@ -0,0 +1,22 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-ssl-ccc
Help: Send CCC after authenticating
Protocols: FTP
Added: 7.16.1
Category: ftp tls
Multi: boolean
See-also:
- ssl
- ftp-ssl-ccc-mode
Example:
- --ftp-ssl-ccc ftps://example.com/
---
# `--ftp-ssl-ccc`
Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after
authenticating. The rest of the control channel communication is
unencrypted. This allows NAT routers to follow the FTP transaction. The
default mode is passive.
@@ -0,0 +1,20 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: ftp-ssl-control
Help: Require TLS for login, clear for transfer
Protocols: FTP
Added: 7.16.0
Category: ftp tls
Multi: boolean
See-also:
- ssl
Example:
- --ftp-ssl-control ftp://example.com
---
# `--ftp-ssl-control`
Require SSL/TLS for the FTP login, clear for transfer. Allows secure
authentication, but non-encrypted data transfers for efficiency. Fails the
transfer if the server does not support SSL/TLS.
+28
View File
@@ -0,0 +1,28 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: get
Short: G
Help: Put the post data in the URL and use GET
Protocols: HTTP
Category: http
Added: 7.8.1
Multi: boolean
See-also:
- data
- request
Example:
- --get $URL
- --get -d "tool=curl" -d "age=old" $URL
- --get -I -d "tool=curl" $URL
---
# `--get`
When used, this option makes all data specified with --data, --data-binary or
--data-urlencode to be used in an HTTP GET request instead of the POST request
that otherwise would be used. curl appends the provided data to the URL as a
query string.
If used in combination with --head, the POST data is instead appended to the
URL with a HEAD request.
+25
View File
@@ -0,0 +1,25 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: globoff
Short: g
Help: Disable URL globbing with {} and []
Category: curl
Added: 7.6
Multi: boolean
See-also:
- config
- disable
Example:
- -g "https://example.com/{[]}}}}"
---
# `--globoff`
Switch off the URL globbing function. When you set this option, you can
specify URLs that contain the letters {}[] without having curl itself
interpret them. Note that these letters are not normal legal URL contents but
they should be encoded according to the URI standard.
curl detects numerical IPv6 addresses when used in URLs and excludes them from
the treatment, so they can still be used without having to disable globbing.
@@ -0,0 +1,30 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: happy-eyeballs-timeout-ms
Arg: <ms>
Help: Time for IPv6 before IPv4
Added: 7.59.0
Category: connection timeout
Multi: single
See-also:
- max-time
- connect-timeout
Example:
- --happy-eyeballs-timeout-ms 500 $URL
---
# `--happy-eyeballs-timeout-ms`
Set the timeout for Happy Eyeballs.
Happy Eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6
addresses for dual-stack hosts, giving IPv6 a head-start of the specified
number of milliseconds. If the IPv6 address cannot be connected to within that
time, then a connection attempt is made to the IPv4 address in parallel. The
first connection to be established is the one that is used.
The range of suggested useful values is limited. Happy Eyeballs RFC 6555 says
"It is RECOMMENDED that connection attempts be paced 150-250 ms apart to
balance human factors against network load." libcurl currently defaults to
200 ms. Firefox and Chrome currently default to 300 ms.
@@ -0,0 +1,33 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: haproxy-clientip
Arg: <ip>
Help: Set address in HAProxy PROXY
Protocols: HTTP
Added: 8.2.0
Category: http proxy
Multi: single
See-also:
- proxy
Example:
- --haproxy-clientip $IP
---
# `--haproxy-clientip`
Set a client IP in HAProxy PROXY protocol v1 header at the beginning of the
connection.
For valid requests, IPv4 addresses must be indicated as a series of exactly
4 integers in the range [0..255] inclusive written in decimal representation
separated by exactly one dot between each other. Heading zeroes are not
permitted in front of numbers in order to avoid any possible confusion
with octal numbers. IPv6 addresses must be indicated as series of 4 hexadecimal
digits (upper or lower case) delimited by colons between each other, with the
acceptance of one double colon sequence to replace the largest acceptable range
of consecutive zeroes. The total number of decoded bits must be exactly 128.
Otherwise, any string can be accepted for the client IP and get sent.
It replaces --haproxy-protocol if used, it is not necessary to specify both flags.
@@ -0,0 +1,23 @@
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: haproxy-protocol
Help: Send HAProxy PROXY protocol v1 header
Protocols: HTTP
Added: 7.60.0
Category: http proxy
Multi: boolean
See-also:
- proxy
Example:
- --haproxy-protocol $URL
---
# `--haproxy-protocol`
Send a HAProxy PROXY protocol v1 header at the beginning of the connection.
This is used by some load balancers and reverse proxies to indicate the
client's true IP address and port.
This option is primarily useful when sending test requests to a service that
expects this header.

Some files were not shown because too many files have changed in this diff Show More