libcurl Validation
Port unavailable for safelibs/port-libcurl: GitHub API request failed for https://api.github.com/repos/safelibs/port-libcurl/releases/latest: HTTP 404
Tests
libcurl file URL read Original / libcurl / easy-file-read Passed
libcurl URL escape round trip Original / libcurl / escape-unescape-roundtrip Passed
libcurl local HTTP status Original / libcurl / http-status-local Passed
libcurl slist header build Original / libcurl / slist-header-build Passed
libcurl version info Original / libcurl / version-info-smoke Passed
curl Accept header echo Original / libcurl / usage-curl-accept-header Passed
curl basic auth header Original / libcurl / usage-curl-basic-auth-header Passed
Sends HTTP basic authentication with curl and verifies the server receives an Authorization header.
curl sends basic auth Original / libcurl / usage-curl-basic-auth Passed
curl --compressed decodes gzip body Original / libcurl / usage-curl-compressed-decode-gzip Passed
Drives curl --compressed against a loopback server returning gzip-encoded bytes and verifies the decoded plaintext payload appears in stdout.
curl compressed gzip response Original / libcurl / usage-curl-compressed-gzip-response-batch11 Passed
curl decompresses HTTP body Original / libcurl / usage-curl-compressed-response Passed
curl loads request options from -K config file Original / libcurl / usage-curl-config-file-load Passed
Reads a curl -K config file containing url and header options and verifies the loopback server echoes the configured custom header.
curl -K - reads config options from stdin Original / libcurl / usage-curl-config-from-stdin Passed
Pipes a curl config block into curl -K - so url and header options are parsed from standard input, and verifies the loopback server echoes the configured custom header.
curl --connect-timeout fails fast on unreachable port Original / libcurl / usage-curl-connect-timeout-unreachable Passed
Targets a closed loopback port with a small --connect-timeout and verifies curl exits with code 7 (couldn't connect) within the timeout window.
curl --connect-timeout 0 disables connect timeout Original / libcurl / usage-curl-connect-timeout-zero Passed
Invokes curl with --connect-timeout 0 against a reachable loopback server and verifies the request still completes successfully (the zero value disables the timeout rather than rejecting the transfer).
curl --connect-to redirects connection to loopback Original / libcurl / usage-curl-connect-to-loopback Passed
Uses curl --connect-to to send a request for a synthetic hostname through a real loopback server and verifies the original Host header is preserved.
curl content disposition remote name Original / libcurl / usage-curl-content-disposition-remote-name-batch11 Passed
curl --continue-at resumes a partial download via Range Original / libcurl / usage-curl-continue-at-resume Passed
Pre-seeds an output file with a known prefix, invokes curl --continue-at to resume the transfer using a Range request to a loopback server, and verifies the assembled file matches the full payload while the resumed status is 206.
curl cookie file send Original / libcurl / usage-curl-cookie-file-send Passed
curl cookie header Original / libcurl / usage-curl-cookie-header-batch11 Passed
curl cookie jar save Original / libcurl / usage-curl-cookie-jar-save Passed
curl cookie jar send Original / libcurl / usage-curl-cookie-jar-send Passed
curl persists cookies Original / libcurl / usage-curl-cookie-jar Passed
curl -b cookie send combined with --cookie-jar save Original / libcurl / usage-curl-cookie-send-and-jar-save Passed
Sends an inline cookie with -b in one call and saves a Set-Cookie response into a jar with --cookie-jar in another, asserting both the echoed Cookie header and the persisted jar entry.
curl create directories output Original / libcurl / usage-curl-create-dirs-output Passed
curl appends custom request header Original / libcurl / usage-curl-custom-header-echoed Passed
Uses curl --header to add a custom request header and verifies the local server echoes its exact value back in the response body.
curl sends custom header value Original / libcurl / usage-curl-custom-header-extra-value Passed
curl sends custom header Original / libcurl / usage-curl-custom-header Passed
curl custom host header Original / libcurl / usage-curl-custom-host-header Passed
Overrides the Host header through curl -H and verifies the server echoes the supplied authority value.
curl --data-binary @file binary upload Original / libcurl / usage-curl-data-binary-file-upload Passed
Posts the contents of a binary file with curl --data-binary @file and verifies the loopback server received the bytes verbatim with no newline mangling.
curl --data-binary preserves newlines Original / libcurl / usage-curl-data-binary-no-newline-trim Passed
Posts a file containing literal CRLF sequences and confirms --data-binary uploads bytes verbatim while --data would have stripped newlines, by comparing what the loopback echo server returns.
curl raw POST data Original / libcurl / usage-curl-data-raw-post Passed
Posts raw form text with curl data-raw mode and verifies the server receives the unmodified payload.
curl -d @- reads POST body from stdin Original / libcurl / usage-curl-data-stdin-post Passed
Pipes a payload into curl -d @- and asserts the custom server echoes the exact body received as application/x-www-form-urlencoded.
curl --data-urlencode named pair Original / libcurl / usage-curl-data-urlencode-named Passed
POSTs a named --data-urlencode 'key=value with spaces' pair to a loopback server and verifies the body is percent-encoded with the key intact.
curl data urlencode plus Original / libcurl / usage-curl-data-urlencode-plus Passed
curl data urlencoded post Original / libcurl / usage-curl-data-urlencoded-post Passed
Posts urlencoded form data with curl and verifies the encoded request body echoed by the server.
curl DELETE include headers Original / libcurl / usage-curl-delete-include-headers Passed
curl DELETE with no body Original / libcurl / usage-curl-delete-no-body Passed
Sends DELETE without any request body and verifies the server reports a zero-length body and recognises the method.
curl DELETE request Original / libcurl / usage-curl-delete-request Passed
curl --digest auth completes challenge handshake Original / libcurl / usage-curl-digest-auth-challenge Passed
Connects to a custom server that returns a 401 with WWW-Authenticate Digest and asserts curl --digest replies with an Authorization Digest header that includes the expected username and realm.
curl -q skips ~/.curlrc Original / libcurl / usage-curl-disable-skips-curlrc Passed
Places a header directive in $HOME/.curlrc that would inject X-FromRc and confirms invoking curl -q sends a request whose echoed headers omit the rc-injected header.
curl --disallow-username-in-url rejects creds in URL Original / libcurl / usage-curl-disallow-username-in-url Passed
Invokes curl with --disallow-username-in-url against a URL that embeds user credentials and expects curl to fail with a non-zero exit and a 'rejected' diagnostic, leaving the loopback server untouched.
curl downloads file Original / libcurl / usage-curl-download-file Passed
curl dump headers file Original / libcurl / usage-curl-dump-headers-file Passed
Saves HTTP response headers to a file with curl and verifies the content-type header is recorded.
curl -D - dumps headers to stdout Original / libcurl / usage-curl-dump-headers-stdout Passed
Asks curl to write response headers to stdout via -D - while sending the body to a file, and verifies status line, headers, and body all land in the expected streams.
curl effective URL writeout Original / libcurl / usage-curl-effective-url-writeout Passed
curl -H "User-Agent:" suppresses the User-Agent header Original / libcurl / usage-curl-empty-user-agent-suppress Passed
Uses the curl -H "Header:" no-value syntax to remove the User-Agent header entirely, and verifies the loopback server reports the User-Agent as missing while a 200 status is still returned.
curl ETag header output Original / libcurl / usage-curl-etag-header-output-batch11 Passed
curl --etag-save writes etag then --etag-compare yields 304 Original / libcurl / usage-curl-etag-save-compare Passed
Saves a server ETag with curl --etag-save and replays the request using --etag-compare so the loopback server returns HTTP 304 when the ETag still matches.
curl fails on 404 Original / libcurl / usage-curl-fail-404 Passed
curl fails on missing HTTP path Original / libcurl / usage-curl-fail-status Passed
curl --fail-with-body returns body on HTTP 404 Original / libcurl / usage-curl-fail-with-body-404 Passed
Verifies curl --fail-with-body writes the response body for an HTTP 404 while still exiting with the failure exit code 22.
curl file:// URL preserves binary bytes Original / libcurl / usage-curl-file-url-binary-body Passed
Reads a binary file via a file:// URL with curl and confirms the downloaded copy is byte-for-byte identical to the source through cmp.
curl reads file URL Original / libcurl / usage-curl-file-url Passed
curl follows redirect Original / libcurl / usage-curl-follow-redirect Passed
curl -F field with explicit content type Original / libcurl / usage-curl-form-field-with-type Passed
Submits a multipart form field with curl -F using the ;type=text/html suffix and verifies the loopback server saw the per-part Content-Type override.
curl --form file=@- reads multipart part from stdin Original / libcurl / usage-curl-form-file-stdin-multipart Passed
Streams a payload into curl --form 'file=@-;type=text/plain' and asserts the custom server receives a multipart/form-data POST whose part body matches the stdin payload exactly.
curl form post Original / libcurl / usage-curl-form-post-multipart Passed
Uploads multipart form data with curl -F and verifies the request body contains the submitted field payload.
curl posts multipart form Original / libcurl / usage-curl-form-post Passed
curl --form-string preserves leading @ literally Original / libcurl / usage-curl-form-string-literal-at Passed
Submits a multipart field whose value begins with @ via curl --form-string and verifies the literal characters are sent (not interpreted as a file reference like -F would).
curl form-string post Original / libcurl / usage-curl-form-string-post Passed
curl -G builds query with data-urlencode Original / libcurl / usage-curl-get-data-urlencode-query-build Passed
Uses curl -G with --data-urlencode to build the query string for a GET request and verifies the local server sees the encoded fields.
curl GET query string Original / libcurl / usage-curl-get-query-string Passed
curl GET URL encoded query Original / libcurl / usage-curl-get-urlencode-query Passed
curl --globoff treats brackets literally Original / libcurl / usage-curl-globoff-literal-brackets Passed
Serves a file whose name contains literal square brackets and confirms curl --globoff fetches the file without attempting URL globbing expansion.
curl head follow redirect Original / libcurl / usage-curl-head-follow-redirect Passed
Sends a HEAD request with redirect following and verifies the final successful response headers.
curl HEAD header echo Original / libcurl / usage-curl-head-header-echo Passed
Sends a custom header on an HTTP HEAD request and verifies the server reflects the value in a response header.
curl HEAD request content type Original / libcurl / usage-curl-head-request-content-type Passed
curl reads HTTP headers Original / libcurl / usage-curl-head-request Passed
curl dumps headers Original / libcurl / usage-curl-header-dump Passed
curl reads headers from file Original / libcurl / usage-curl-header-from-file Passed
Uses curl --header @headerfile to load multiple custom request headers from a file and verifies the server sees each of them.
curl --help all lists key flags Original / libcurl / usage-curl-help-all-lists-flags Passed
Captures curl --help all output and asserts that several long-form options (--proto, --resolve, --output-dir, --etag-save, --variable) are advertised, exercising help introspection without any network access.
curl --help http lists HTTP-only flags Original / libcurl / usage-curl-help-category-http Passed
Captures curl --help http output and verifies the category banner plus several HTTP-specific options (--anyauth, --location, --max-redirs, --post301) appear in that filtered list, exercising the categorized help mode.
curl write-out content type Original / libcurl / usage-curl-http-code-variable Passed
curl downloads HTTP body Original / libcurl / usage-curl-http-get Passed
curl HTTP/1.0 request Original / libcurl / usage-curl-http1-0-request Passed
curl HTTP 1.1 request Original / libcurl / usage-curl-http1-1-request Passed
curl if none match header Original / libcurl / usage-curl-if-none-match-header Passed
curl include custom response header Original / libcurl / usage-curl-include-custom-header-response Passed
Requests with curl -i and verifies a custom server response header X-Validator-Tenth is included alongside the body.
curl includes response headers Original / libcurl / usage-curl-include-headers Passed
Fetches an HTTP resource with curl include mode and verifies both response headers and body bytes appear in the output stream.
curl inline cookie Original / libcurl / usage-curl-inline-cookie Passed
Sends an inline Cookie header with curl and verifies the server receives the expected cookie pair.
curl interface loopback Original / libcurl / usage-curl-interface-loopback Passed
curl sends JSON content type Original / libcurl / usage-curl-json-header Passed
curl JSON convenience option Original / libcurl / usage-curl-json-option Passed
curl --libcurl writes a C source skeleton Original / libcurl / usage-curl-libcurl-dump-c-code Passed
Performs a file:// fetch with --libcurl <file> and verifies the generated C source contains the expected curl/curl.h include, curl_easy_setopt calls, and a CURLOPT_URL line referencing the file URL.
curl --location --max-redirs 3 follows up to 3 hops Original / libcurl / usage-curl-location-max-redirs-three Passed
Walks a 3-hop redirect chain on the loopback server and verifies curl follows it to the final body when --max-redirs 3 is set.
curl --location follows a relative redirect target Original / libcurl / usage-curl-location-relative-redirect Passed
Follows a 302 redirect whose Location header is a relative path, verifies curl resolved it against the original loopback host, and checks the final body and effective URL.
curl --location-trusted forwards credentials Original / libcurl / usage-curl-location-trusted-auth-forward Passed
Redirects from /start to /target on the same loopback host and verifies curl --location-trusted -u forwards the Authorization header to the redirected request, while plain --location does not.
curl --manual prints the embedded manual Original / libcurl / usage-curl-manual-display Passed
Runs curl --manual and verifies the embedded manual text is emitted to stdout, including a recognizable curl(1) section heading and a zero exit status.
curl --max-filesize aborts with exit 63 Original / libcurl / usage-curl-max-filesize-exceeded Passed
Requests a body larger than --max-filesize from a custom server and asserts curl exits with status 63 (CURLE_FILESIZE_EXCEEDED).
curl --max-redirs 100 allows long redirect chains Original / libcurl / usage-curl-max-redirs-explicit-allowance Passed
Walks a long chain of loopback redirects with curl --max-redirs 100 and confirms curl followed every hop, ending at the terminal handler with the expected redirect count.
curl --max-redirs 0 errors on redirect Original / libcurl / usage-curl-max-redirs-zero-error Passed
With --location and --max-redirs 0, curl must refuse to follow any redirect and exit with a non-zero status.
curl --max-time aborts slow loopback response Original / libcurl / usage-curl-max-time-slow-loopback Passed
Targets a loopback handler that sleeps before responding and verifies curl --max-time 1 aborts the transfer with exit code 28.
curl max time success Original / libcurl / usage-curl-max-time-success-batch11 Passed
curl -X with arbitrary methods COPY and LOCK Original / libcurl / usage-curl-method-arbitrary-copy-lock Passed
Sends arbitrary HTTP methods COPY and LOCK with -X against a handler implementing dispatch via command name and asserts each is received.
curl -X PATCH with explicit body echo Original / libcurl / usage-curl-method-patch-explicit-body Passed
Sends a PATCH with -X and -d against a custom handler and asserts the server echoes the method name and request body.
curl -X TRACE custom method Original / libcurl / usage-curl-method-trace-custom Passed
Sends an HTTP TRACE request via curl -X against a loopback handler that echoes the method and verifies the response confirms TRACE was issued.
curl -F multipart includes well-formed boundary in echoed body Original / libcurl / usage-curl-multipart-explicit-boundary Passed
Posts a curl multipart form, captures the loopback echo of the request body, and verifies both the Content-Type boundary parameter and the matching multipart delimiter line appear in the echoed payload.
curl netrc auth header Original / libcurl / usage-curl-netrc-auth-header-batch11 Passed
curl --next chained POST then GET Original / libcurl / usage-curl-next-chained-post-then-get Passed
Chains a POST and a GET in a single curl invocation using --next to reset request options, and verifies both responses are written to their respective output files.
curl --next chained DELETE then GET Original / libcurl / usage-curl-next-delete-then-get Passed
Chains a DELETE and a GET in a single curl invocation using --next so request method state is reset between transfers, and verifies both responses land in their separate output files with the expected http_code values.
curl next multiple URLs Original / libcurl / usage-curl-next-multiple-urls Passed
Downloads two URLs in a single curl invocation with next separators and verifies both responses are emitted.
curl --no-keepalive disables TCP keepalive Original / libcurl / usage-curl-no-keepalive-connection-close Passed
Runs curl with --no-keepalive against a loopback server and verifies the verbose trace shows TCP_KEEPALIVE was disabled while the body still transfers.
curl --no-progress-meter suppresses progress output Original / libcurl / usage-curl-no-progress-meter-quiet Passed
Confirms --no-progress-meter keeps stdout body intact while emitting no progress meter on stderr (errors still go to stderr separately).
curl --noproxy bypasses --proxy for matched host Original / libcurl / usage-curl-noproxy-bypass-loopback Passed
Configures an unreachable proxy with --proxy plus --noproxy 127.0.0.1, then fetches from a loopback http.server. The request must reach the loopback server directly because the --noproxy match disables the proxy for that host.
curl OPTIONS request Original / libcurl / usage-curl-options-request Passed
curl --output-dir writes to nested directory Original / libcurl / usage-curl-output-dir-flag Passed
Combines curl --output-dir, --create-dirs and --remote-name to download a loopback URL into a freshly-created nested directory and verifies the file landed there.
curl writes output file Original / libcurl / usage-curl-output-file Passed
curl output file body Original / libcurl / usage-curl-output-trailing-newline Passed
Downloads a response with curl -o and verifies the saved body file exists and contains the expected payload string.
curl -Z parallel runs multiple transfers concurrently Original / libcurl / usage-curl-parallel-multi-transfer Passed
Issues two GETs in a single curl invocation with -Z (parallel) so transfers run concurrently against the loopback server, and verifies both response bodies are written to their distinct output files with the expected content.
curl PATCH request Original / libcurl / usage-curl-patch-request Passed
curl posts request body Original / libcurl / usage-curl-post-echo Passed
curl POST empty body Original / libcurl / usage-curl-post-empty-body Passed
curl posts binary file Original / libcurl / usage-curl-post-file-binary Passed
curl --progress-bar emits to stderr Original / libcurl / usage-curl-progress-bar-stderr Passed
Downloads a small loopback resource with --progress-bar and confirms the bar character stream is written to stderr while stdout still contains the body bytes.
curl --proxy through a loopback HTTP proxy Original / libcurl / usage-curl-proxy-loopback-forward Passed
Routes curl through a small loopback HTTP proxy that rewrites the absolute-form request line to an origin server and asserts the proxied response body is returned.
curl PUT echo Original / libcurl / usage-curl-put-echo-batch11 Passed
curl put payload echo Original / libcurl / usage-curl-put-payload-echo Passed
Uploads a file with curl -T using HTTP PUT and verifies the server response echoes the uploaded body.
curl uploads PUT body Original / libcurl / usage-curl-put-upload Passed
curl data urlencode query Original / libcurl / usage-curl-query-data-urlencode-batch11 Passed
curl sends query parameters Original / libcurl / usage-curl-query-params Passed
curl -H 'Expect:' suppresses Expect 100-continue header Original / libcurl / usage-curl-r10-expect-100-disable-header Passed
Compares the request headers a loopback server observes for a 2 KiB POST: the default sends Expect: 100-continue, while -H 'Expect:' suppresses it.
curl -4 forces IPv4 path against localhost Original / libcurl / usage-curl-r10-ipv4-only-loopback Passed
Resolves localhost with -4 (--ipv4) to ensure curl picks the IPv4 loopback and reports remote_ip 127.0.0.1 in --write-out.
curl --no-progress-meter suppresses progress without --silent Original / libcurl / usage-curl-r10-no-progress-meter-suppress Passed
Compares stderr between a default invocation (which prints a progress meter) and one with --no-progress-meter, asserting that --no-progress-meter yields empty stderr while preserving the response body.
curl --oauth2-bearer adds Authorization Bearer header Original / libcurl / usage-curl-r10-oauth2-bearer-header Passed
Sends --oauth2-bearer with a sample token to a loopback server that echoes the request Authorization header, and asserts the header equals "Bearer <token>".
curl --write-out filename_effective matches -O target Original / libcurl / usage-curl-r10-write-out-filename-effective Passed
Uses -O to download a file and asserts %{filename_effective} reports the basename derived from the URL path.
curl --write-out '%header{name}' echoes a specific response header Original / libcurl / usage-curl-r10-write-out-header-token Passed
Hits a loopback server that emits a custom X-Validator-R10 header and asserts curl exposes its value via the %header{X-Validator-R10} write-out token.
curl --write-out reports local_ip and local_port for loopback Original / libcurl / usage-curl-r10-write-out-local-ip-loopback Passed
Verifies that --write-out exposes %{local_ip}=127.0.0.1 for a loopback HTTP transfer and that %{local_port} is a non-zero numeric ephemeral port.
curl --write-out reports HTTP method Original / libcurl / usage-curl-r10-write-out-method-patch Passed
Issues an explicit -X PATCH request to a loopback server and asserts that the --write-out token %{method} echoes back the request method literally.
curl --write-out reports remote_ip and remote_port for loopback Original / libcurl / usage-curl-r10-write-out-remote-ip-loopback Passed
Asserts that --write-out exposes %{remote_ip}=127.0.0.1 and %{remote_port} matching the loopback server port for an HTTP/1.1 request.
curl --write-out response_code reflects 204 No Content Original / libcurl / usage-curl-r10-write-out-response-code-204 Passed
Posts to a loopback server returning 204 No Content and asserts %{response_code} is exactly 204 with no response body printed.
curl --max-filesize aborts download when Content-Length exceeds the cap Original / libcurl / usage-curl-r11-max-filesize-rejects-large Passed
Hosts a 100-byte file on a loopback server and asserts curl --max-filesize 5 exits with code 63 (CURLE_FILESIZE_EXCEEDED) and writes nothing to the output file.
curl --noproxy bypasses an unreachable HTTP_PROXY environment variable Original / libcurl / usage-curl-r11-noproxy-bypasses-env-proxy Passed
Sets HTTP_PROXY to an unreachable address and verifies that --noproxy 127.0.0.1 still allows curl to talk directly to a loopback server, returning HTTP 200.
curl --output-dir + --create-dirs writes into a fresh subdirectory Original / libcurl / usage-curl-r11-output-dir-creates-subdir Passed
Combines --output-dir <fresh path> with --create-dirs and verifies curl creates the missing directory tree and writes the response body into it.
curl --range 0-3 fetches only the first four bytes of a Range-aware server Original / libcurl / usage-curl-r11-range-bytes-prefix Passed
Hosts a 20-byte payload behind a custom loopback handler that honors the Range header and asserts curl --range 0-3 returns exactly the first four bytes "0123" with HTTP 206.
curl --fail on a 404 sets %{exitcode} to 22 (CURLE_HTTP_RETURNED_ERROR) Original / libcurl / usage-curl-r11-write-out-fail-exitcode-22 Passed
Requests a missing path with --fail against a loopback server, captures stderr separately, and asserts the trailing %{exitcode} write-out token reports 22 even though stdout/stderr are split.
curl --write-out '%{http_version}' reports HTTP major version Original / libcurl / usage-curl-r11-write-out-http-version Passed
Issues a GET against a Python loopback HTTP/1.1 server and asserts the %{http_version} write-out token resolves to "1" (curl reports the major HTTP version).
curl --write-out '%{json}' emits a JSON object with documented keys Original / libcurl / usage-curl-r11-write-out-json-keys-shape Passed
Hits a loopback HTTP server with -w '%{json}' and asserts the captured payload parses as a JSON object containing http_code, method, scheme, response_code and exitcode keys.
curl --write-out '%{scheme}' returns uppercase HTTP for plain http URLs Original / libcurl / usage-curl-r11-write-out-scheme-uppercase Passed
Hits a loopback HTTP server and asserts that curl 8.5's %{scheme} write-out token reports the URL scheme in uppercase ("HTTP"), matching the libcurl documented format.
curl --write-out '%{size_upload}' equals the POST body byte count Original / libcurl / usage-curl-r11-write-out-size-upload-post Passed
POSTs a fixed 17-byte payload via --data-binary to a loopback server and asserts %{size_upload} reports exactly 17 bytes uploaded.
curl --write-out '%{time_total}' parses as a strictly positive number Original / libcurl / usage-curl-r11-write-out-time-total-positive Passed
Performs a loopback GET and asserts the %{time_total} write-out token formats as a parseable decimal that is strictly greater than zero.
curl --data-ascii posts the literal payload with a default form content type Original / libcurl / usage-curl-r12-data-ascii-post Passed
Posts a literal payload via curl --data-ascii to a loopback handler that echoes the request body and Content-Type header, asserts the recorded body matches the supplied bytes and the default Content-Type is application/x-www-form-urlencoded.
curl -G -d a=1 -d b=2 builds a GET query string from data fields Original / libcurl / usage-curl-r12-get-with-d-builds-query Passed
Spins up a loopback handler that echoes the request path and method, runs curl -G -d a=1 -d b=2, and asserts the server received GET /echo?a=1&b=2 (data fields concatenated with & into the query string).
curl --ignore-content-length still receives the full body when server reports the length Original / libcurl / usage-curl-r12-ignore-content-length-flag Passed
Fetches a loopback file with --ignore-content-length and verifies curl reports HTTP 200 and the captured bytes match the source byte-for-byte, demonstrating that ignoring the Content-Length header does not truncate the response on a normal connection.
curl --limit-rate caps throughput while still completing the transfer with HTTP 200 Original / libcurl / usage-curl-r12-limit-rate-allows-completion Passed
Serves a small payload from a loopback http.server, fetches it with curl --limit-rate 1M, and asserts the request completes with response_code 200 and the body matches the served bytes despite the artificial rate cap.
curl --post301 -L preserves POST when following a 301 redirect Original / libcurl / usage-curl-r12-post301-keeps-method Passed
Hosts a loopback handler that returns 301 Location -> /target and reports the request method on /target, posts a body via curl -L --post301, and asserts the followed request was still POST (not converted to GET).
curl --retry --retry-delay succeeds against a server that becomes ready on the second request Original / libcurl / usage-curl-r12-retry-delay-respected Passed
Hosts a loopback handler that returns HTTP 503 on the first hit and HTTP 200 on the second, runs curl --retry 2 --retry-delay 1 against /flaky, and asserts the second attempt yields a 200 with the expected body.
curl --trace-ascii --trace-time prefixes trace lines with HH:MM:SS.microseconds timestamps Original / libcurl / usage-curl-r12-trace-time-stamps-lines Passed
Runs a loopback fetch with --trace-ascii path --trace-time, then asserts at least one line in the trace file begins with the documented timestamp prefix HH:MM:SS.MICROSECONDS produced by --trace-time.
curl -w %{size_request} reports the bytes sent in the request line plus headers Original / libcurl / usage-curl-r12-write-out-size-request-post Passed
Posts a known-length body to a loopback handler and asserts %{size_request} is greater than zero and at least as large as the body length, demonstrating the token covers request-line bytes and headers in addition to the body.
curl -L -w %{url_effective} reports the redirected target URL after Location follow Original / libcurl / usage-curl-r12-write-out-url-effective-after-redirect Passed
Hosts a loopback handler that returns 301 Location -> /final and serves /final with HTTP 200, runs curl -L with -w '%{url_effective}', and asserts the captured token is the absolute URL of /final on the test port.
curl -w %{url} echoes the requested URL exactly as supplied on the command line Original / libcurl / usage-curl-r12-write-out-url-token Passed
Fetches a loopback URL with a unique query string and -w '%{url}', asserts curl emits the exact URL passed on the command line as the write-out token even when the body itself goes elsewhere.
curl --form-string keeps a literal @path value as a multipart form field, not a file upload Original / libcurl / usage-curl-r13-form-string-literal-at-r13 Passed
POSTs to a loopback server that echoes the multipart body and asserts that --form-string "marker=@/etc/hostname" sends the literal value "@/etc/hostname" as the form field rather than reading and uploading the referenced file.
curl --header passes multiple custom request headers through to the server Original / libcurl / usage-curl-r13-header-multi-value-passthrough Passed
Hosts a loopback server that echoes selected request headers, sends a request with two -H flags carrying distinct X-Marker-A and X-Marker-B values, and asserts both header values are recorded verbatim in the server's response body.
curl --keepalive-time 60 is accepted and completes the loopback transfer Original / libcurl / usage-curl-r13-keepalive-time-accepted Passed
Fetches a loopback URL with curl --keepalive-time 60 and asserts the response code is 200 and the body matches the served file. Verifies the option is parsed and applied without breaking a normal transfer.
curl -L --max-redirs 3 stops following after three hops and surfaces the documented error Original / libcurl / usage-curl-r13-max-redirs-explicit-three Passed
Hosts a loopback server that returns a 302 chain longer than 3 hops, asserts curl -L --max-redirs 3 fails with exit code 47 (CURLE_TOO_MANY_REDIRECTS) and reports the maximum-redirects diagnostic on stderr, while a separate run with a sufficient budget completes successfully.
curl --no-buffer (-N) writes the response body to the output file unchanged Original / libcurl / usage-curl-r13-no-buffer-fetches-body Passed
Fetches a small file from a loopback HTTP server with curl --no-buffer (-N) and asserts the on-disk output matches the source byte-for-byte and that --no-buffer does not corrupt or truncate the body.
curl --range -3 fetches the trailing 3 bytes of a Range-aware loopback server Original / libcurl / usage-curl-r13-range-suffix-bytes Passed
Hosts a 20-byte payload behind a custom loopback handler that honors the Range header (including suffix-byte ranges of the form bytes=-N), asserts curl --range -3 returns the last three bytes "hij" with HTTP 206.
curl --request PROPFIND sends an arbitrary HTTP method to the server Original / libcurl / usage-curl-r13-request-flag-overrides-method Passed
Posts to a loopback server that echoes self.command and asserts curl --request PROPFIND -X via the long form sends the literal PROPFIND verb in the request line. Confirms --request overrides the default GET.
curl --tcp-fastopen completes a loopback GET with 200 OK Original / libcurl / usage-curl-r13-tcp-fastopen-loopback-200 Passed
Starts a python loopback HTTP server, fetches a small file with curl --tcp-fastopen, asserts the response code is 200 and the body matches the on-disk file byte-for-byte. The kernel may not honor TFO inside the harness, but curl must accept the option and still complete the transfer.
curl --tr-encoding emits the documented TE: gzip request header Original / libcurl / usage-curl-r13-tr-encoding-adds-te-header Passed
Issues a verbose curl request against a loopback server with --tr-encoding, captures the verbose stderr trace, and asserts the request line block contains a literal "TE: gzip" line, confirming curl asks for compressed transfer-encoding.
curl --user-agent sets the User-Agent header to the supplied literal string Original / libcurl / usage-curl-r13-user-agent-explicit-string Passed
Issues a request to a loopback server that echoes the User-Agent header back in the response body and asserts curl --user-agent "validator-r13/1.0" results in the exact User-Agent string being recorded server-side.
curl --connect-to redirects the TCP target while preserving the request URL host Original / libcurl / usage-curl-r14-connect-to-redirects-host Passed
Starts a loopback HTTP server on a high port and uses curl --connect-to "example.com:80:127.0.0.1:<port>" with a request URL of http://example.com/ to make curl connect to the loopback server while still emitting Host: example.com in the request line. Asserts the response is 200 and the body matches the served file.
curl -H @file reads multiple custom headers from a newline-delimited file Original / libcurl / usage-curl-r14-header-from-file-at-prefix Passed
Writes a header file with two custom request headers, runs curl with -H @<file> against a python BaseHTTPRequestHandler that echoes back every received header, and asserts both custom header names and values appear verbatim in the echoed response, demonstrating the @file ingestion path for -H.
curl --json sends a POST with application/json content-type and accept headers Original / libcurl / usage-curl-r14-json-shorthand-post Passed
Issues curl --json '{"a":1}' against a python POST echo handler and asserts the recorded request was a POST whose Content-Type and Accept headers are both application/json (the curl 7.82+ --json shorthand) and whose body equals the supplied JSON literal.
curl --next runs a second request in the same invocation with a separate output file Original / libcurl / usage-curl-r14-multi-next-fetches-two-urls Passed
Issues a single curl invocation that fetches two URLs separated by --next, with each URL's body written to a distinct -o output. Asserts both files are populated with their respective server payloads, demonstrating the per-request reset between --next-delimited requests.
curl --no-progress-meter suppresses the progress UI without --silent Original / libcurl / usage-curl-r14-no-progress-meter-silent-stderr Passed
Fetches a small file from a loopback HTTP server with curl --no-progress-meter (and without -s), captures stderr, and asserts the request succeeds with HTTP 200, the body matches the source byte-for-byte, and the recorded stderr contains no "Total" / "Speed" / "%" progress meter row characters.
curl --output-dir combined with -O writes the URL leaf into the chosen directory Original / libcurl / usage-curl-r14-output-dir-with-remote-name Passed
Combines curl --output-dir with -O (remote name) and asserts that the file is created at <output-dir>/<leaf> using the URL's last path segment as the filename, that the body matches the source byte-for-byte, and that the leaf is not created in the current working directory.
curl --remote-time copies the server Last-Modified onto the saved local file Original / libcurl / usage-curl-r14-remote-time-preserves-mtime Passed
Hosts a file with a fixed mtime via python http.server, fetches it with curl --remote-time, and asserts the saved file's mtime epoch matches the source file's mtime epoch (within a 1-second tolerance) so the Last-Modified header is being honored.
curl --request-target rewrites the HTTP request line path independently of the URL Original / libcurl / usage-curl-r14-request-target-overrides-path Passed
Issues curl with a URL whose path is /placeholder but with --request-target /actual.txt, runs against a python handler that echoes back the request-line path, and asserts the recorded request path is /actual.txt rather than /placeholder.
curl --resolve forces hostname resolution to a specified address and port Original / libcurl / usage-curl-r14-resolve-host-mapping Passed
Starts a loopback HTTP server and fetches the URL http://example.test:<port>/payload.txt with curl --resolve "example.test:<port>:127.0.0.1". Asserts the response is 200 and the body matches the served file, demonstrating the static DNS override.
curl --xattr writes user.xdg.origin.url and user.mime_type onto the saved file Original / libcurl / usage-curl-r14-xattr-records-origin-url Passed
Fetches a file from a loopback HTTP server with curl --xattr, then enumerates the saved file's user-namespace extended attributes via os.listxattr in python and asserts user.xdg.origin.url is present and equals the request URL, and user.mime_type is present.
curl -I -X GET prints response headers without the body even when the method is overridden to GET Original / libcurl / usage-curl-r15-head-x-get-emits-headers-only Passed
Runs curl -I -X GET against a loopback HTTP server, captures stdout, and asserts the captured stream contains the HTTP/1.0 200 status line plus the Content-Length header but does NOT contain the served response body. Pins curl's "headers-only" mode under -I when the method is overridden to GET.
curl --no-clobber keeps an existing -o target intact and writes the download to a sibling .1 path Original / libcurl / usage-curl-r15-no-clobber-keeps-existing Passed
Pre-creates a destination file, runs curl --no-clobber -o <existing> against a loopback server, and asserts the original file is left byte-for-byte intact while the downloaded body lands at <existing>.1, demonstrating curl's collision-avoidance rename behavior.
curl --proto '-all,+http' enables only HTTP and successfully fetches an http:// URL Original / libcurl / usage-curl-r15-proto-allow-only-http Passed
Issues a curl GET against a loopback HTTP server with --proto '-all,+http' so every protocol except HTTP is disabled. Asserts the request still completes with a 200 response code and the body matches the served file, demonstrating the per-protocol allowlist.
curl --raw passes the response body through without internal decoding and reports the raw byte count Original / libcurl / usage-curl-r15-raw-disables-decoding Passed
Fetches a static file from a loopback HTTP server with curl --raw, captures the body to a file plus '%{size_download}' from --write-out, and asserts both the saved file size and the writeout-reported byte count equal the on-disk source file size, demonstrating that --raw disables internal transfer-encoding decoding.
curl --trace-ascii writes a trace file whose lines start with "==" or direction prefixes Original / libcurl / usage-curl-r15-trace-ascii-records-info-lines Passed
Runs a curl GET against a loopback server with --trace-ascii <file>, asserts the produced trace file includes "Info:" lines (preceded by "==") for connection events plus directional markers ("=>" or "<=") for the request/response, demonstrating the human-readable trace dump.
curl --variable + --expand-url substitutes a variable into the request URL at fetch time Original / libcurl / usage-curl-r15-variable-expand-url Passed
Defines a curl variable HOST=127.0.0.1 with --variable, then issues a request whose URL contains "{{HOST}}" with --expand-url. Asserts curl substitutes the variable into the URL at request time and the loopback server delivers the expected body.
curl --write-out '%{num_connects}' reports a single TCP connection for one HTTP fetch Original / libcurl / usage-curl-r15-write-out-num-connects Passed
Runs a single curl GET against a loopback HTTP server with --write-out '%{num_connects}\n' and asserts the captured value is exactly "1", pinning the per-transfer connection-count writeout token's behavior for a one-hop request.
curl --write-out '%{size_header}' reports a positive byte count for the received response headers Original / libcurl / usage-curl-r15-write-out-size-header Passed
Issues a curl GET against a loopback HTTP server with --write-out '%{size_header}\n' and asserts the captured value is a positive integer, demonstrating that curl exposes the total received-header byte count via the size_header writeout token.
curl --write-out '%{time_namelookup}' reports a non-negative seconds.fraction value Original / libcurl / usage-curl-r15-write-out-time-namelookup Passed
Runs a curl GET against a loopback HTTP server with --write-out '%{time_namelookup}' and asserts the captured value is a fixed-point number with a fractional part (matches "<int>.<digits>") and is greater than or equal to zero. Pins the time_namelookup writeout token's numeric format.
curl --write-out '%{url}' echoes the request URL exactly as supplied on the command line Original / libcurl / usage-curl-r15-write-out-url-token Passed
Runs a curl GET against a loopback HTTP server with --write-out 'url=%{url}', captures stdout, and asserts the writeout line equals "url=" followed by the request URL passed to curl. Pins the lossless echo of the input URL by the %{url} token.
curl --data @file sends the file body as the POST payload Original / libcurl / usage-curl-r16-data-at-file-post-body Passed
Builds a small file and asserts that curl --data @file against a loopback echo server posts the file's content as the request body, locking in the @-prefixed --data file-load path. Uses a python http.server subclass that echoes POST bodies back as text.
curl file:// fetches a local file byte-identical to its source Original / libcurl / usage-curl-r16-file-url-md5-equal Passed
Builds a small binary payload and asserts curl with a file:// URL produces output whose sha256 equals the source file's sha256, exercising curl's filesystem-source path without involving any network or HTTP server.
curl -F posts multipart/form-data with named field to a loopback echo Original / libcurl / usage-curl-r16-form-multipart-loopback Passed
Stands up a small python http.server that returns the raw POST body, then issues curl -F 'tag=value-r16' and asserts the resulting body contains both the field name "tag" and the literal value "value-r16" in multipart form encoding.
curl -H sends a custom header that the loopback server echoes back Original / libcurl / usage-curl-r16-header-flag-roundtrip Passed
Stands up a python http.server handler that echoes the X-R16-Token request header value into the response body, then asserts curl -H 'X-R16-Token: alpha-bravo' delivers the same value back to the client byte-for-byte.
curl -L follows a single 302 redirect to the destination body Original / libcurl / usage-curl-r16-location-follows-relative-chain Passed
Stands up a tiny http.server that replies with a 302 Location: /target.txt to the root path and serves a fixed body at /target.txt. Asserts curl -L returns the target body, locking in basic --location single-hop redirect handling.
curl --max-time small value triggers exit 28 on unreachable port Original / libcurl / usage-curl-r16-max-time-tight-throwaway Passed
Issues curl with a 1-second --max-time against a high port that is not bound on the loopback interface and asserts the command exits non-zero with the operation-timeout exit code 28, locking in curl's hard time bound enforcement.
curl -o explicit filename and -O remote-name save identical bytes Original / libcurl / usage-curl-r16-output-flag-vs-remote-name Passed
Hosts a small payload and asserts that "-o local.bin" and "-O" (remote-name) both produce files with the same sha256 — locking in that the two output flags share the same underlying body bytes, only the destination filename differs.
curl --resolve routes a fake hostname to the loopback http.server Original / libcurl / usage-curl-r16-resolve-maps-fake-host Passed
Hosts content on 127.0.0.1 and asserts curl --resolve fake.r16.example:port:127.0.0.1 plus a URL using that hostname returns the loopback body, locking in --resolve's pre-DNS rewrite without depending on /etc/hosts.
curl --write-out %{http_code} prints 200 for a successful loopback GET Original / libcurl / usage-curl-r16-write-out-http-code-200 Passed
Hosts a small payload on a loopback http.server and asserts curl with -w "%{http_code}" emits literally "200" to stdout on a successful GET, locking in the http_code write-out token shape against a known-good endpoint.
curl --user user:pass sends an Authorization Basic header echoed by loopback Original / libcurl / usage-curl-r17-basic-auth-header-echo Passed
Stands up a python http.server that echoes the Authorization request header into the response body, then runs curl --user 'alpha:secret' and confirms the body starts with "Basic " and decodes back to "alpha:secret" via base64.
curl --connect-timeout exits 28 for an unreachable address within the bound Original / libcurl / usage-curl-r17-connect-timeout-unreachable-port Passed
Runs curl with --connect-timeout 1 against a non-routable address (203.0.113.1, TEST-NET-3) and asserts the exit code is 28 — locking in the connect-phase timeout exit code for an unreachable peer.
curl --cookie key=value reaches the loopback server's Cookie header Original / libcurl / usage-curl-r17-cookie-flag-echo Passed
Stands up a python http.server that echoes the Cookie request header into the response body, asserts the server is reachable, then issues curl --cookie 'session=tokenR17' and confirms the response body contains "session=tokenR17".
curl --cookie-jar writes a file then --cookie reuses it on a second request Original / libcurl / usage-curl-r17-cookie-jar-then-reuse Passed
Stands up a python http.server that sets a Set-Cookie header on /set and echoes the inbound Cookie header on /echo, then issues a first curl with --cookie-jar against /set, asserts the jar file exists, and issues a second curl with --cookie <jar> against /echo confirming the cookie roundtrips.
curl --create-dirs --output writes through a not-yet-existing directory tree Original / libcurl / usage-curl-r17-create-dirs-nested-output Passed
Stands up a python http.server serving a small file, then invokes curl --create-dirs --output with a target path under multiple non-existent parent directories and asserts the nested file exists with the expected content.
curl --http1.0 and --http1.1 each fetch a loopback resource successfully Original / libcurl / usage-curl-r17-http10-and-http11-both-succeed Passed
Stands up a python http.server serving a static file, asserts the server is reachable, then issues two curl requests — one with --http1.0 and one with --http1.1 — and confirms both responses match the file's content byte-for-byte.
curl --insecure is accepted on an http URL and fetches the resource normally Original / libcurl / usage-curl-r17-insecure-flag-noop-on-http Passed
Stands up a python http.server serving a small file, then issues curl with --insecure against the plain http URL and asserts the response body matches the served file — locking in that --insecure is a no-op on non-TLS schemes rather than rejected.
curl -X PUT --data sends a body that the loopback PUT handler echoes back Original / libcurl / usage-curl-r17-put-data-roundtrip Passed
Stands up a python http.server with a do_PUT handler that echoes the request body, asserts the server is reachable, then runs curl -X PUT --data 'k=v' and confirms the response body equals "k=v".
curl --silent suppresses progress and --show-error keeps error text on failure Original / libcurl / usage-curl-r17-silent-vs-show-error Passed
Runs curl --silent against a deliberately unreachable port and confirms stderr is empty, then runs curl --silent --show-error against the same target and confirms stderr contains a recognizable error token — locking in the two-flag interaction.
curl --user-agent value reaches a loopback echo server Original / libcurl / usage-curl-r17-user-agent-echo Passed
Stands up a python http.server that echoes the User-Agent request header into the response body, asserts the server is reachable, then issues curl --user-agent "validator/1" and confirms the response body contains the literal "validator/1" token.
curl --data-urlencode percent-escapes reserved characters before sending Original / libcurl / usage-curl-r18-data-urlencode-percent-escapes Passed
Stands up a python loopback http.server that echoes the POST body verbatim, then issues curl with --data-urlencode 'k=a b&c' and asserts the echoed body equals "k=a+b%26c" — locking in curl's application/x-www-form-urlencoded encoding of space (as +) and ampersand (as %26).
curl -X DELETE against a /resource endpoint receives the expected 204 No Content status Original / libcurl / usage-curl-r18-delete-method-status-204 Passed
Stands up a python loopback http.server whose do_DELETE handler returns 204 with no body, issues curl -X DELETE with -w '%{http_code}', and asserts the captured status token equals "204" — locking in the DELETE method dispatch and no-content response handling.
curl -L follows a 302 redirect and returns the final body Original / libcurl / usage-curl-r18-follow-redirect-l-flag Passed
Stands up a python loopback http.server that responds to /go with a 302 Location pointing at /final and to /final with the body "destination", then issues curl -L against /go and asserts the captured body equals "destination" — locking in -L redirect-following behavior.
curl --form sends a multipart/form-data POST whose body carries the field name and value Original / libcurl / usage-curl-r18-form-multipart-field Passed
Stands up a python loopback http.server that echoes the POST body, then issues curl --form 'greeting=hi-there' and asserts the recovered body contains the multipart boundary marker plus both the field name "greeting" and the field value "hi-there".
curl -I prints response headers including Content-Length Original / libcurl / usage-curl-r18-head-flag-content-length Passed
Stands up a python loopback http.server that returns a fixed thirteen-byte body with an explicit Content-Length header, issues curl -I against /size, and asserts the captured output contains both "HTTP/" status and "Content-Length: 13" — locking in HEAD-style header retrieval.
curl --header forwards a custom X-Request-Id header to the server Original / libcurl / usage-curl-r18-header-custom-x-token Passed
Stands up a python loopback http.server that echoes the inbound X-Request-Id request header in the response body, issues curl --header 'X-Request-Id: token-abc-123', and asserts the captured body equals exactly "token-abc-123".
curl -i prepends the HTTP status line and headers to the response body Original / libcurl / usage-curl-r18-include-headers-in-output Passed
Stands up a python loopback http.server that returns the body "payload-only" with a custom X-Trace header, issues curl -i, and asserts the captured output contains the HTTP status line, the custom X-Trace header value, and the body — locking in the -i (include) flag's header-in-output behavior.
curl -o - writes the response body to stdout where the calling shell can capture it Original / libcurl / usage-curl-r18-output-to-stdout-dash Passed
Stands up a python loopback http.server that returns the body "stdout-payload", issues curl with -o - and redirects stdout to a file, and asserts the captured content equals "stdout-payload" — locking in the -o - convention as an explicit stdout sink.
curl --range 4-7 returns the four middle bytes of the response body Original / libcurl / usage-curl-r18-range-middle-bytes Passed
Stands up a python loopback http.server that serves a fixed ten-byte body "0123456789" with explicit Content-Length, issues curl --range 4-7 against it, and asserts the captured output equals exactly "4567" — locking in byte-range request semantics.
curl -w prints the http_code 404 when the loopback server responds with not-found Original / libcurl / usage-curl-r18-write-out-http-code-404 Passed
Stands up a python loopback http.server that returns 404 with an empty body on /missing, then issues curl with -w '%{http_code}' against /missing and asserts the captured token is exactly "404" — locking in the write-out http_code variable on a non-2xx status.
curl --data-urlencode percent-escapes a literal ampersand in the value Original / libcurl / usage-curl-r19-data-urlencode-ampersand Passed
Stands up a python loopback http.server that echoes the POST body, posts with curl --data-urlencode 'q=a&b', and asserts the recovered body equals "q=a%26b" - locking in ampersand-to-%26 percent encoding via --data-urlencode.
curl -g treats square brackets in the URL path as literal characters Original / libcurl / usage-curl-r19-globoff-square-brackets-literal Passed
Stands up a python loopback http.server that echoes the request path in the response body, fetches "/q[1]" with curl -g, and asserts the echoed path equals "/q[1]" - locking in -g globbing-off behavior so bracket characters reach the wire as-is.
curl -I receives Content-Type text/plain from a HEAD-responding loopback server Original / libcurl / usage-curl-r19-head-content-type-text-plain Passed
Stands up a python loopback http.server that returns Content-Type text/plain on HEAD, issues curl -I, and asserts the captured headers contain "Content-Type: text/plain" with no message body bytes - locking in -I HEAD request behavior and header surface.
curl --max-time succeeds on a fast loopback response well under the budget Original / libcurl / usage-curl-r19-max-time-bounds-completion Passed
Stands up a python loopback http.server with an immediate response, issues curl --max-time 10 against /fast, and asserts the response body equals "fast-ok" with exit code 0 - locking in --max-time non-interference when the transfer completes promptly.
curl -X OPTIONS receives the Allow header from a loopback server Original / libcurl / usage-curl-r19-options-method-allow-header Passed
Stands up a python loopback http.server that responds to OPTIONS with an Allow header listing GET, HEAD, OPTIONS, then issues curl -X OPTIONS -i and asserts the captured headers contain "Allow:" with all three methods - locking in OPTIONS method handling and header capture via -i.
curl -o writes the response body byte-for-byte to a named file Original / libcurl / usage-curl-r19-output-file-from-loopback Passed
Stands up a python loopback http.server that returns a known 32-byte payload, fetches with curl -o into a target path, and asserts the on-disk file is exactly 32 bytes and sha256-matches the expected payload - locking in -o output fidelity.
curl POST with an empty body succeeds and observes Content-Length 0 Original / libcurl / usage-curl-r19-post-empty-body-rc-zero Passed
Stands up a python loopback http.server that echoes back the value of the Content-Length request header on POST, issues curl -X POST -d '' with no body, and asserts the captured echo equals "0" and exit code is 0 - locking in empty-body POST behavior.
curl --referer sets the Referer request header observed by the server Original / libcurl / usage-curl-r19-referer-header-echo Passed
Stands up a python loopback http.server that echoes the value of the Referer header in the body, issues curl --referer 'https://example.test/origin', and asserts the recovered body equals that exact URL - locking in --referer header delivery.
curl -w "%{content_type}" surfaces the server-declared Content-Type Original / libcurl / usage-curl-r19-write-out-content-type-json Passed
Stands up a python loopback http.server that returns Content-Type "application/json; charset=utf-8", then issues curl with -w '%{content_type}' and asserts the captured token contains "application/json" - locking in the content_type write-out variable.
curl -w "%{size_download}" reports the body byte count of a fixed payload Original / libcurl / usage-curl-r19-write-out-size-download Passed
Stands up a python loopback http.server that always returns a 13-byte body, then issues curl with -w '%{size_download}' and asserts the captured value is exactly "13" - locking in the size_download write-out variable on a known fixed-size response.
curl --data-binary preserves a payload byte-for-byte through POST to loopback Original / libcurl / usage-curl-r20-data-binary-post-echo Passed
Stands up a python loopback http.server that echoes the POST body, then posts with curl --data-binary @file using a fixed payload containing newlines, and asserts the recovered body matches the source file byte-for-byte - locking in --data-binary's no-transform behavior.
curl -f exits with code 22 when the server returns 404 Original / libcurl / usage-curl-r20-fail-flag-404-rc-22 Passed
Stands up a python loopback http.server that always responds 404 Not Found, then runs curl -f -o /dev/null and asserts curl exits with code 22 - locking in the --fail flag's non-zero exit on HTTP error.
curl -I receives a numeric Content-Length header from loopback Original / libcurl / usage-curl-r20-head-content-length-numeric Passed
Stands up a python loopback http.server that returns a fixed 11-byte body with Content-Length set, then issues curl -I and asserts the response headers contain a "Content-Length: 11" line - locking in HEAD-request header propagation.
curl -i prepends an HTTP/1.x 200 status line to the output body Original / libcurl / usage-curl-r20-include-headers-status-line Passed
Stands up a python loopback http.server that returns 200 OK with a body, then issues curl -i and asserts the captured output begins with an HTTP status line ending in "200" - locking in -i header-inclusion before the body.
curl --range 0-4 fetches the first five bytes from a loopback server Original / libcurl / usage-curl-r20-range-explicit-zero-four Passed
Stands up a python loopback http.server that serves a fixed 16-byte payload, then issues curl --range 0-4 -o file and asserts the recovered file is exactly 5 bytes long and matches the prefix of the payload - locking in client-driven Range request handling.
curl --resolve maps a fake hostname to 127.0.0.1 and fetches a loopback body Original / libcurl / usage-curl-r20-resolve-fake-host Passed
Stands up a python loopback http.server bound to 127.0.0.1, then issues curl with --resolve fake.r20.local:<port>:127.0.0.1 against http://fake.r20.local:<port>/ and asserts the response body equals "ok" - locking in client-side hostname-to-IP override.
curl -A sets a custom User-Agent that the loopback server echoes Original / libcurl / usage-curl-r20-user-agent-flag-echo Passed
Stands up a python loopback http.server that echoes the request's User-Agent header in the response body, then issues curl -A 'validator-r20/1.0' and asserts the recovered body contains the literal "validator-r20/1.0" - locking in -A user-agent override behavior.
curl -w "%{http_code}" surfaces a 201 Created status from a loopback server Original / libcurl / usage-curl-r20-write-out-http-code-201 Passed
Stands up a python loopback http.server that responds 201 Created to POST, then issues curl -X POST -o /dev/null -w '%{http_code}' and asserts the captured value equals "201" - locking in write-out HTTP code reporting on a non-200 success path.
curl -w "%{num_headers}" reports at least one response header Original / libcurl / usage-curl-r20-write-out-num-headers-positive Passed
Stands up a python loopback http.server that returns a small response with several headers, then issues curl -w '%{num_headers}' and asserts the captured value is a positive integer - locking in the num_headers write-out variable.
curl -w "%{size_request}" reports a positive request size for a POST Original / libcurl / usage-curl-r20-write-out-size-request Passed
Stands up a python loopback http.server that accepts POST, then issues curl with a POST body and -w '%{size_request}' and asserts the captured value is a positive integer - locking in the size_request write-out variable on a body-bearing request.
curl --anyauth negotiates to basic auth when only Basic is offered Original / libcurl / usage-curl-r21-anyauth-falls-back-basic Passed
Stands up a python loopback http.server that on first request returns 401 with WWW-Authenticate: Basic realm=r21 and on second request (with Authorization) returns 200 echoing the Authorization header, then issues curl --anyauth -u user:pass and asserts the captured echoed Authorization header begins with "Basic " - locking in --anyauth's challenge-response negotiation falling back to Basic.
curl -K config file applies header and silent flag together Original / libcurl / usage-curl-r21-config-file-multiple-options Passed
Stands up a python loopback http.server that echoes the X-CfgR21 header, writes a multi-line curl config file containing both `silent` and a `header = "X-CfgR21: ok"` directive, then runs curl -K with the config file plus the URL and asserts the captured body is exactly "ok" - locking in multi-option config-file loading distinct from prior config-from-stdin tests.
curl --data-urlencode "key@file" percent-encodes the file contents as the value Original / libcurl / usage-curl-r21-data-urlencode-from-file Passed
Stands up a python loopback http.server that echoes the POST body, writes a tempfile containing "hello world", then issues curl --data-urlencode "msg@<file>" and asserts the echoed body equals "msg=hello+world" (curl renders space as "+" in application/x-www-form-urlencoded) - locking in --data-urlencode's filename-source ("@file") encoding behavior.
curl -H "X-Empty;" emits the named header with empty value Original / libcurl / usage-curl-r21-empty-header-via-semicolon Passed
Stands up a python loopback http.server that echoes the received X-Empty header value into the response body, then issues curl -H "X-Empty;" (the semicolon syntax to force an empty-value header) and asserts the server saw the X-Empty header present with an empty string - locking in libcurl's empty-header injection via the semicolon syntax.
curl --get combines two -d fragments into one ampersand-joined query Original / libcurl / usage-curl-r21-get-multiple-d-build-query Passed
Stands up a python loopback http.server that echoes the request path, then issues curl --get with two separate -d "k1=v1" -d "k2=v2" flags against it and asserts the path echoed back includes "k1=v1&k2=v2" - locking in --get's multi-fragment query assembly behavior at two fragments specifically.
curl -o - writes a 256-byte binary payload to stdout byte-for-byte Original / libcurl / usage-curl-r21-output-dash-stdout-binary Passed
Stands up a python loopback http.server returning a 256-byte payload covering bytes 0x00-0xFF, issues curl -o - (explicit stdout) capturing into a file, and asserts the captured bytes match the source payload by SHA-256 - locking in -o - explicit-stdout dispatch on a binary payload distinct from prior -o-to-stdout-dash tests using ASCII bodies.
curl -w "%{num_headers}" reports at least three response headers on loopback Original / libcurl / usage-curl-r21-write-out-num-headers-positive Passed
Stands up a python loopback http.server that returns Content-Type, Content-Length, and X-Marker headers, then issues curl -w '%{num_headers}' and asserts the captured number is >= 3 - locking in num_headers write-out token reporting (existing num-headers-positive test is simpler - this version asserts a specific lower bound).
curl -w "%{response_code}" surfaces the HTTP status as the http_code alias Original / libcurl / usage-curl-r21-write-out-response-code-alias Passed
Stands up a python loopback http.server that returns 200 OK, then issues curl -w '%{response_code}' against it and asserts the captured value is "200" - locking in the response_code write-out token (alias for http_code) which is distinct from the existing http_code-201/204/404/200 tests by exercising the alias form specifically.
curl -w "%{size_header}" reports a positive numeric byte count on loopback Original / libcurl / usage-curl-r21-write-out-size-header-numeric Passed
Stands up a python loopback http.server returning a small body, issues curl -w '%{size_header}' against it, and asserts the captured value is a positive integer greater than 30 (since headers always include Content-Length and HTTP/1.x status line) - locking in size_header write-out reporting (existing size-header test from r15 exists; this version pins a numeric lower bound).
curl -w "%{url_effective}" emits the full http://127.0.0.1:port/path URL after request Original / libcurl / usage-curl-r21-write-out-url-effective-shape Passed
Stands up a python loopback http.server, issues curl -w '%{url_effective}' against a /alpha path, and asserts the captured URL equals exactly the request URL string - locking in url_effective on a non-redirect path (existing url-effective-after-redirect test covers redirected URLs; this exercises the no-redirect case).
curl --data @file reads from disk Original / libcurl / usage-curl-r9-data-from-file-prefix Passed
Posts a body sourced from a file via --data @path against an echo server and confirms the body contents arrived without the @ prefix.
curl multipart form with multiple fields Original / libcurl / usage-curl-r9-form-multiple-fields Passed
POSTs two --form fields to a loopback echo server and verifies both Content-Disposition headers and field values appear in the multipart body.
curl OPTIONS reads Allow header Original / libcurl / usage-curl-r9-options-method-allow Passed
Sends an HTTP OPTIONS request to a loopback server and verifies the Allow header is parsed and dumped to stdout via -i.
curl --output-dir with --create-dirs Original / libcurl / usage-curl-r9-output-dir-with-create Passed
Downloads a payload into a deeply nested output directory using --output-dir and --create-dirs and verifies curl created the directory tree.
curl PUT with --upload-file Original / libcurl / usage-curl-r9-put-upload-file Passed
Uploads a small file via PUT against a loopback server that echoes the body and verifies the request method and payload were transmitted.
curl --range fetches trailing bytes Original / libcurl / usage-curl-r9-range-bytes-tail Passed
Requests the trailing 5 bytes of a known payload via --range against a loopback server and validates the partial response matches the file tail.
curl --resolve rewrites a custom host Original / libcurl / usage-curl-r9-resolve-rewrites-host Passed
Uses --resolve to point a synthetic hostname at 127.0.0.1 and verifies the request reaches a local server while the Host header reflects the synthetic name.
curl --write-out reports header_size Original / libcurl / usage-curl-r9-write-out-content-length Passed
Issues a HEAD request and validates that --write-out exposes a positive %{size_header} value reflecting the response header bytes.
curl --write-out reports num_redirects Original / libcurl / usage-curl-r9-write-out-num-redirects Passed
Follows a chain of two server-side redirects and validates curl exposes the expected redirect count via %{num_redirects}.
curl --write-out reports size_download Original / libcurl / usage-curl-r9-write-out-size-download Passed
Downloads a known-length payload from a loopback server and verifies curl emits the exact byte count via %{size_download}.
curl range explicit bytes Original / libcurl / usage-curl-range-explicit-bytes Passed
Issues an explicit bytes range request through curl -r and verifies the partial body matches the requested slice.
curl --range starting from middle of file Original / libcurl / usage-curl-range-from-offset Passed
Issues an open-ended range starting from a middle offset with curl --range and verifies the loopback server returned only the suffix bytes.
curl --range with multiple ranges Original / libcurl / usage-curl-range-multiple-ranges Passed
Issues a multi-range request with curl --range and verifies the loopback server returned a 206 multipart/byteranges body containing every requested slice.
curl range request Original / libcurl / usage-curl-range-request Passed
curl --range 0-3 reads file prefix Original / libcurl / usage-curl-range-static-prefix-bytes Passed
Requests bytes 0-3 of a static loopback resource via --range and verifies only the first four bytes of the body are returned.
curl --rate limits serial request rate Original / libcurl / usage-curl-rate-limit-multi-transfer Passed
Issues two URLs in one curl invocation with --rate "120/m" and verifies both transfers complete with status 200.
curl redirect count writeout Original / libcurl / usage-curl-redirect-count-writeout Passed
curl follows redirect Original / libcurl / usage-curl-redirect Passed
curl referer header Original / libcurl / usage-curl-referer-header Passed
curl remote header name Original / libcurl / usage-curl-remote-header-name Passed
Downloads a response with Content-Disposition and verifies curl saves the server-provided filename.
curl --remote-name-all saves multiple URLs Original / libcurl / usage-curl-remote-name-all-multi Passed
Downloads two loopback URLs in a single curl invocation with --remote-name-all and verifies both files appear with their remote-derived names and expected contents.
curl remote name output Original / libcurl / usage-curl-remote-name Passed
curl --remove-on-error removes partial output Original / libcurl / usage-curl-remove-on-error-deletes-output Passed
Talks to a loopback server that advertises a longer Content-Length than it sends so curl reports a transfer-closed error after writing some bytes. Without --remove-on-error the partial file is kept; with --remove-on-error curl deletes it. Verifies both behaviors.
curl --request-target absolute form Original / libcurl / usage-curl-request-target-absolute Passed
Forces curl to send an absolute-form request target via --request-target and verifies the loopback server received the override path verbatim.
curl resolve loopback host Original / libcurl / usage-curl-resolve-loopback-host-batch11 Passed
curl retry on transient failure Original / libcurl / usage-curl-retry-success Passed
curl --retry 0 does not retry 5xx Original / libcurl / usage-curl-retry-zero-no-retry-5xx Passed
Hits a loopback handler that increments a counter on every request and verifies that --retry 0 --fail produces exactly one request even on a 503.
curl silent fail missing Original / libcurl / usage-curl-silent-fail-missing Passed
curl --ssl-no-revoke accepted on plain HTTP Original / libcurl / usage-curl-ssl-no-revoke-http-noop Passed
Confirms --ssl-no-revoke is parsed and is a no-op against plain HTTP loopback transfers, returning the expected payload.
curl verbose stderr trace Original / libcurl / usage-curl-stderr-verbose-info Passed
Runs curl with -v and verifies the verbose stderr stream contains both the request line and the response status header.
curl --tcp-fastopen accepted on plain HTTP Original / libcurl / usage-curl-tcp-fastopen-accepted Passed
Confirms --tcp-fastopen is accepted by curl and the underlying transfer still completes successfully against a loopback server.
curl --tcp-nodelay completes a loopback transfer with 200 Original / libcurl / usage-curl-tcp-nodelay Passed
Issues a curl request with --tcp-nodelay to a loopback server and verifies the response body and http_code are returned correctly with TCP_NODELAY enabled.
curl --time-cond sends If-Modified-Since header Original / libcurl / usage-curl-time-cond-newer Passed
Uses curl --time-cond with an explicit RFC 1123 timestamp and verifies the loopback server observes a matching If-Modified-Since request header and returns 200 with the payload.
curl ASCII trace Original / libcurl / usage-curl-trace-ascii Passed
Records an ASCII request trace with curl and verifies the captured trace includes the outgoing HTTP request line.
curl TRACE request Original / libcurl / usage-curl-trace-request Passed
curl --unix-socket transport Original / libcurl / usage-curl-unix-socket-loopback Passed
Starts a Python HTTPServer bound to a UNIX domain socket and verifies curl --unix-socket transports an HTTP GET over the AF_UNIX path.
curl upload file Original / libcurl / usage-curl-upload-file Passed
curl uploads stdin Original / libcurl / usage-curl-upload-stdin Passed
Streams request body bytes from stdin with curl upload mode and verifies the server receives the full payload.
curl URL globbing brace expansion Original / libcurl / usage-curl-url-glob-brace Passed
Uses curl URL globbing with {a,b} brace syntax to fetch multiple loopback paths in one invocation and verifies both bodies are written to numbered output files.
curl URL-encoded post Original / libcurl / usage-curl-urlencoded-post Passed
curl user agent header Original / libcurl / usage-curl-user-agent-header-batch11 Passed
curl sends user agent Original / libcurl / usage-curl-user-agent-header Passed
curl --variable expanded into POST data Original / libcurl / usage-curl-variable-expand-data Passed
Defines a curl 8.x --variable and references it via --expand-data so the substituted value reaches the loopback server in the POST body.
curl --variable name@file expands file contents into a header Original / libcurl / usage-curl-variable-from-file Passed
Defines a curl 8.x --variable from a file (name@path) and expands it into a request header so the loopback server sees the file's contents in the echoed header value.
curl -v with --silent keeps verbose trace Original / libcurl / usage-curl-verbose-silent-combo Passed
Combines curl -v and --silent and verifies the verbose trace still reaches stderr while the progress meter is suppressed and stdout carries only the response body.
curl reports protocol support Original / libcurl / usage-curl-version-features Passed
curl write-out status Original / libcurl / usage-curl-write-out-status Passed
Requests a text response with curl --write-out and verifies the reported status code and content type summary.
curl reports write-out metrics Original / libcurl / usage-curl-write-out Passed
curl write-out content type Original / libcurl / usage-curl-writeout-content-type Passed
curl -w %{exitcode}/%{errormsg} reports failure details Original / libcurl / usage-curl-writeout-exitcode-errormsg Passed
Forces a file:// open failure for a missing path and uses -w '%{exitcode}|%{errormsg}' to verify the writeout reports a non-zero libcurl exit code and a non-empty error message string.
curl write-out emits header JSON Original / libcurl / usage-curl-writeout-header-json Passed
Uses curl -w '%{header_json}' to dump response headers as JSON and verifies a custom header from the loopback server appears as a JSON key.
curl write-out reports HTTP version Original / libcurl / usage-curl-writeout-http-version Passed
Captures the negotiated HTTP version from a loopback server through curl -w '%{http_version}' and asserts it is 1.1.
curl write-out %{json} document Original / libcurl / usage-curl-writeout-json-template Passed
Uses curl -w '%{json}' to dump the full transfer document and verifies the resulting JSON parses and contains the http_code field for a loopback GET.
curl writeout num headers Original / libcurl / usage-curl-writeout-num-headers Passed
Captures the num_headers writeout variable from curl and verifies a positive header count is reported.
curl writeout zero redirects Original / libcurl / usage-curl-writeout-num-redirects-zero Passed
curl -w %{redirect_url} on 301 reports the Location target Original / libcurl / usage-curl-writeout-redirect-url-301 Passed
Issues a request without -L against a custom server that returns 301 with a Location header and asserts curl -w '%{redirect_url}' prints the absolute redirect target.
curl -w %{scheme} reports FILE for file URL Original / libcurl / usage-curl-writeout-scheme-file Passed
Performs a file:// fetch with -w '%{scheme}' and asserts the writeout reports the upper-case scheme name FILE that libcurl uses for the file protocol.
curl writeout size download Original / libcurl / usage-curl-writeout-size-download Passed
Downloads a fixed-size response and verifies the size_download writeout reports the exact byte count.
curl write-out size upload on POST Original / libcurl / usage-curl-writeout-size-upload Passed
Posts a fixed-size body to a loopback server and verifies curl -w '%{size_upload}' reports the same byte count that was sent.
curl write-out size Original / libcurl / usage-curl-writeout-size Passed
curl -w %{ssl_verify_result} on plain HTTP returns 0 Original / libcurl / usage-curl-writeout-ssl-verify-result-plain Passed
Requests plain HTTP from a loopback server and asserts curl -w '%{ssl_verify_result}' prints 0 because no TLS handshake happened.
curl --write-out '%{stderr}...' routes summary to stderr Original / libcurl / usage-curl-writeout-stderr Passed
Uses curl -w '%{stderr}msg-...' so the write-out template is emitted on stderr while the HTTP response body still goes to stdout/file, and verifies stdout, stderr, and http_code are all correct.
curl -w @file reads write-out template from a file Original / libcurl / usage-curl-writeout-template-from-file Passed
Stores a write-out template in a file then invokes curl with -w @file against a file:// URL, asserting the rendered output substitutes %{size_download}, %{scheme}, and %{url_effective} from the loaded template.
curl write-out time variables Original / libcurl / usage-curl-writeout-time-fields Passed
Uses curl -w to print %{time_total}, %{time_namelookup}, and %{time_connect} for a loopback fetch and verifies all three are present and parseable as non-negative floating point values.
CVE-2014-8150 libcurl regression Original / libcurl / cve-2014-8150 Passed
Asserts that curl rejects URLs containing literal CR/LF bytes with a "Malformed input to a URL function" error rather than embedding them into the outgoing request line, which is the CRLF-injection vector the patch closed.
CVE-2023-27533 libcurl regression Original / libcurl / cve-2023-27533 Passed
Asserts that curl rejects telnet URLs whose user/option strings contain CR/LF characters, preventing the IAC-injection vector that the patch closed.
CVE-2024-2004 libcurl regression Original / libcurl / cve-2024-2004 Passed
Asserts that curl --proto refuses a scheme that is not in the allow list ("Protocol not supported or disabled in libcurl") rather than silently transferring with a disabled protocol.
libcurl file URL read Port / libcurl / easy-file-read Failed
libcurl URL escape round trip Port / libcurl / escape-unescape-roundtrip Failed
libcurl local HTTP status Port / libcurl / http-status-local Failed
libcurl slist header build Port / libcurl / slist-header-build Failed
libcurl version info Port / libcurl / version-info-smoke Failed
curl Accept header echo Port / libcurl / usage-curl-accept-header Failed
curl basic auth header Port / libcurl / usage-curl-basic-auth-header Failed
Sends HTTP basic authentication with curl and verifies the server receives an Authorization header.
curl sends basic auth Port / libcurl / usage-curl-basic-auth Failed
curl --compressed decodes gzip body Port / libcurl / usage-curl-compressed-decode-gzip Failed
Drives curl --compressed against a loopback server returning gzip-encoded bytes and verifies the decoded plaintext payload appears in stdout.
curl compressed gzip response Port / libcurl / usage-curl-compressed-gzip-response-batch11 Failed
curl decompresses HTTP body Port / libcurl / usage-curl-compressed-response Failed
Fetches a gzip-encoded local response with curl --compressed and verifies the decoded body.
curl loads request options from -K config file Port / libcurl / usage-curl-config-file-load Failed
Reads a curl -K config file containing url and header options and verifies the loopback server echoes the configured custom header.
curl -K - reads config options from stdin Port / libcurl / usage-curl-config-from-stdin Failed
Pipes a curl config block into curl -K - so url and header options are parsed from standard input, and verifies the loopback server echoes the configured custom header.
curl --connect-timeout fails fast on unreachable port Port / libcurl / usage-curl-connect-timeout-unreachable Failed
Targets a closed loopback port with a small --connect-timeout and verifies curl exits with code 7 (couldn't connect) within the timeout window.
curl --connect-timeout 0 disables connect timeout Port / libcurl / usage-curl-connect-timeout-zero Failed
Invokes curl with --connect-timeout 0 against a reachable loopback server and verifies the request still completes successfully (the zero value disables the timeout rather than rejecting the transfer).
curl --connect-to redirects connection to loopback Port / libcurl / usage-curl-connect-to-loopback Failed
Uses curl --connect-to to send a request for a synthetic hostname through a real loopback server and verifies the original Host header is preserved.
curl content disposition remote name Port / libcurl / usage-curl-content-disposition-remote-name-batch11 Failed
curl --continue-at resumes a partial download via Range Port / libcurl / usage-curl-continue-at-resume Failed
Pre-seeds an output file with a known prefix, invokes curl --continue-at to resume the transfer using a Range request to a loopback server, and verifies the assembled file matches the full payload while the resumed status is 206.
curl cookie file send Port / libcurl / usage-curl-cookie-file-send Failed
Loads a Netscape cookie jar with curl and verifies the sent Cookie header on the server.
curl cookie header Port / libcurl / usage-curl-cookie-header-batch11 Failed
curl cookie jar save Port / libcurl / usage-curl-cookie-jar-save Failed
curl cookie jar send Port / libcurl / usage-curl-cookie-jar-send Failed
curl persists cookies Port / libcurl / usage-curl-cookie-jar Failed
curl -b cookie send combined with --cookie-jar save Port / libcurl / usage-curl-cookie-send-and-jar-save Failed
Sends an inline cookie with -b in one call and saves a Set-Cookie response into a jar with --cookie-jar in another, asserting both the echoed Cookie header and the persisted jar entry.
curl create directories output Port / libcurl / usage-curl-create-dirs-output Failed
curl appends custom request header Port / libcurl / usage-curl-custom-header-echoed Failed
Uses curl --header to add a custom request header and verifies the local server echoes its exact value back in the response body.
curl sends custom header value Port / libcurl / usage-curl-custom-header-extra-value Failed
curl sends custom header Port / libcurl / usage-curl-custom-header Failed
curl custom host header Port / libcurl / usage-curl-custom-host-header Failed
Overrides the Host header through curl -H and verifies the server echoes the supplied authority value.
curl --data-binary @file binary upload Port / libcurl / usage-curl-data-binary-file-upload Failed
Posts the contents of a binary file with curl --data-binary @file and verifies the loopback server received the bytes verbatim with no newline mangling.
curl --data-binary preserves newlines Port / libcurl / usage-curl-data-binary-no-newline-trim Failed
Posts a file containing literal CRLF sequences and confirms --data-binary uploads bytes verbatim while --data would have stripped newlines, by comparing what the loopback echo server returns.
curl raw POST data Port / libcurl / usage-curl-data-raw-post Failed
Posts raw form text with curl data-raw mode and verifies the server receives the unmodified payload.
curl -d @- reads POST body from stdin Port / libcurl / usage-curl-data-stdin-post Failed
Pipes a payload into curl -d @- and asserts the custom server echoes the exact body received as application/x-www-form-urlencoded.
curl --data-urlencode named pair Port / libcurl / usage-curl-data-urlencode-named Failed
POSTs a named --data-urlencode 'key=value with spaces' pair to a loopback server and verifies the body is percent-encoded with the key intact.
curl data urlencode plus Port / libcurl / usage-curl-data-urlencode-plus Failed
curl data urlencoded post Port / libcurl / usage-curl-data-urlencoded-post Failed
Posts urlencoded form data with curl and verifies the encoded request body echoed by the server.
curl DELETE include headers Port / libcurl / usage-curl-delete-include-headers Failed
curl DELETE with no body Port / libcurl / usage-curl-delete-no-body Failed
Sends DELETE without any request body and verifies the server reports a zero-length body and recognises the method.
curl DELETE request Port / libcurl / usage-curl-delete-request Failed
Sends an HTTP DELETE request with curl and verifies the custom server acknowledges the method.
curl --digest auth completes challenge handshake Port / libcurl / usage-curl-digest-auth-challenge Failed
Connects to a custom server that returns a 401 with WWW-Authenticate Digest and asserts curl --digest replies with an Authorization Digest header that includes the expected username and realm.
curl -q skips ~/.curlrc Port / libcurl / usage-curl-disable-skips-curlrc Failed
Places a header directive in $HOME/.curlrc that would inject X-FromRc and confirms invoking curl -q sends a request whose echoed headers omit the rc-injected header.
curl --disallow-username-in-url rejects creds in URL Port / libcurl / usage-curl-disallow-username-in-url Failed
Invokes curl with --disallow-username-in-url against a URL that embeds user credentials and expects curl to fail with a non-zero exit and a 'rejected' diagnostic, leaving the loopback server untouched.
curl downloads file Port / libcurl / usage-curl-download-file Failed
curl dump headers file Port / libcurl / usage-curl-dump-headers-file Failed
Saves HTTP response headers to a file with curl and verifies the content-type header is recorded.
curl -D - dumps headers to stdout Port / libcurl / usage-curl-dump-headers-stdout Failed
Asks curl to write response headers to stdout via -D - while sending the body to a file, and verifies status line, headers, and body all land in the expected streams.
curl effective URL writeout Port / libcurl / usage-curl-effective-url-writeout Failed
curl -H "User-Agent:" suppresses the User-Agent header Port / libcurl / usage-curl-empty-user-agent-suppress Failed
Uses the curl -H "Header:" no-value syntax to remove the User-Agent header entirely, and verifies the loopback server reports the User-Agent as missing while a 200 status is still returned.
curl ETag header output Port / libcurl / usage-curl-etag-header-output-batch11 Failed
curl --etag-save writes etag then --etag-compare yields 304 Port / libcurl / usage-curl-etag-save-compare Failed
Saves a server ETag with curl --etag-save and replays the request using --etag-compare so the loopback server returns HTTP 304 when the ETag still matches.
curl fails on 404 Port / libcurl / usage-curl-fail-404 Failed
curl fails on missing HTTP path Port / libcurl / usage-curl-fail-status Failed
curl --fail-with-body returns body on HTTP 404 Port / libcurl / usage-curl-fail-with-body-404 Failed
Verifies curl --fail-with-body writes the response body for an HTTP 404 while still exiting with the failure exit code 22.
curl file:// URL preserves binary bytes Port / libcurl / usage-curl-file-url-binary-body Failed
Reads a binary file via a file:// URL with curl and confirms the downloaded copy is byte-for-byte identical to the source through cmp.
curl reads file URL Port / libcurl / usage-curl-file-url Failed
curl follows redirect Port / libcurl / usage-curl-follow-redirect Failed
curl -F field with explicit content type Port / libcurl / usage-curl-form-field-with-type Failed
Submits a multipart form field with curl -F using the ;type=text/html suffix and verifies the loopback server saw the per-part Content-Type override.
curl --form file=@- reads multipart part from stdin Port / libcurl / usage-curl-form-file-stdin-multipart Failed
Streams a payload into curl --form 'file=@-;type=text/plain' and asserts the custom server receives a multipart/form-data POST whose part body matches the stdin payload exactly.
curl form post Port / libcurl / usage-curl-form-post-multipart Failed
Uploads multipart form data with curl -F and verifies the request body contains the submitted field payload.
curl posts multipart form Port / libcurl / usage-curl-form-post Failed
curl --form-string preserves leading @ literally Port / libcurl / usage-curl-form-string-literal-at Failed
Submits a multipart field whose value begins with @ via curl --form-string and verifies the literal characters are sent (not interpreted as a file reference like -F would).
curl form-string post Port / libcurl / usage-curl-form-string-post Failed
Posts multipart form data with curl --form-string and verifies the encoded field payload.
curl -G builds query with data-urlencode Port / libcurl / usage-curl-get-data-urlencode-query-build Failed
Uses curl -G with --data-urlencode to build the query string for a GET request and verifies the local server sees the encoded fields.
curl GET query string Port / libcurl / usage-curl-get-query-string Failed
curl GET URL encoded query Port / libcurl / usage-curl-get-urlencode-query Failed
curl --globoff treats brackets literally Port / libcurl / usage-curl-globoff-literal-brackets Failed
Serves a file whose name contains literal square brackets and confirms curl --globoff fetches the file without attempting URL globbing expansion.
curl head follow redirect Port / libcurl / usage-curl-head-follow-redirect Failed
Sends a HEAD request with redirect following and verifies the final successful response headers.
curl HEAD header echo Port / libcurl / usage-curl-head-header-echo Failed
Sends a custom header on an HTTP HEAD request and verifies the server reflects the value in a response header.
curl HEAD request content type Port / libcurl / usage-curl-head-request-content-type Failed
Sends an HTTP HEAD request with curl and verifies the content type response header is returned.
curl reads HTTP headers Port / libcurl / usage-curl-head-request Failed
curl dumps headers Port / libcurl / usage-curl-header-dump Failed
curl reads headers from file Port / libcurl / usage-curl-header-from-file Failed
Uses curl --header @headerfile to load multiple custom request headers from a file and verifies the server sees each of them.
curl --help all lists key flags Port / libcurl / usage-curl-help-all-lists-flags Failed
Captures curl --help all output and asserts that several long-form options (--proto, --resolve, --output-dir, --etag-save, --variable) are advertised, exercising help introspection without any network access.
curl --help http lists HTTP-only flags Port / libcurl / usage-curl-help-category-http Failed
Captures curl --help http output and verifies the category banner plus several HTTP-specific options (--anyauth, --location, --max-redirs, --post301) appear in that filtered list, exercising the categorized help mode.
curl write-out content type Port / libcurl / usage-curl-http-code-variable Failed
curl downloads HTTP body Port / libcurl / usage-curl-http-get Failed
curl HTTP/1.0 request Port / libcurl / usage-curl-http1-0-request Failed
Forces an HTTP/1.0 request with curl and verifies the request version observed by the server.
curl HTTP 1.1 request Port / libcurl / usage-curl-http1-1-request Failed
curl if none match header Port / libcurl / usage-curl-if-none-match-header Failed
Sends an If-None-Match request header with curl and verifies the server returns a 304 response.
curl include custom response header Port / libcurl / usage-curl-include-custom-header-response Failed
Requests with curl -i and verifies a custom server response header X-Validator-Tenth is included alongside the body.
curl includes response headers Port / libcurl / usage-curl-include-headers Failed
Fetches an HTTP resource with curl include mode and verifies both response headers and body bytes appear in the output stream.
curl inline cookie Port / libcurl / usage-curl-inline-cookie Failed
Sends an inline Cookie header with curl and verifies the server receives the expected cookie pair.
curl interface loopback Port / libcurl / usage-curl-interface-loopback Failed
curl sends JSON content type Port / libcurl / usage-curl-json-header Failed
curl JSON convenience option Port / libcurl / usage-curl-json-option Failed
curl --libcurl writes a C source skeleton Port / libcurl / usage-curl-libcurl-dump-c-code Failed
Performs a file:// fetch with --libcurl <file> and verifies the generated C source contains the expected curl/curl.h include, curl_easy_setopt calls, and a CURLOPT_URL line referencing the file URL.
curl --location --max-redirs 3 follows up to 3 hops Port / libcurl / usage-curl-location-max-redirs-three Failed
Walks a 3-hop redirect chain on the loopback server and verifies curl follows it to the final body when --max-redirs 3 is set.
curl --location follows a relative redirect target Port / libcurl / usage-curl-location-relative-redirect Failed
Follows a 302 redirect whose Location header is a relative path, verifies curl resolved it against the original loopback host, and checks the final body and effective URL.
curl --location-trusted forwards credentials Port / libcurl / usage-curl-location-trusted-auth-forward Failed
Redirects from /start to /target on the same loopback host and verifies curl --location-trusted -u forwards the Authorization header to the redirected request, while plain --location does not.
curl --manual prints the embedded manual Port / libcurl / usage-curl-manual-display Failed
Runs curl --manual and verifies the embedded manual text is emitted to stdout, including a recognizable curl(1) section heading and a zero exit status.
curl --max-filesize aborts with exit 63 Port / libcurl / usage-curl-max-filesize-exceeded Failed
Requests a body larger than --max-filesize from a custom server and asserts curl exits with status 63 (CURLE_FILESIZE_EXCEEDED).
curl --max-redirs 100 allows long redirect chains Port / libcurl / usage-curl-max-redirs-explicit-allowance Failed
Walks a long chain of loopback redirects with curl --max-redirs 100 and confirms curl followed every hop, ending at the terminal handler with the expected redirect count.
curl --max-redirs 0 errors on redirect Port / libcurl / usage-curl-max-redirs-zero-error Failed
With --location and --max-redirs 0, curl must refuse to follow any redirect and exit with a non-zero status.
curl --max-time aborts slow loopback response Port / libcurl / usage-curl-max-time-slow-loopback Failed
Targets a loopback handler that sleeps before responding and verifies curl --max-time 1 aborts the transfer with exit code 28.
curl max time success Port / libcurl / usage-curl-max-time-success-batch11 Failed
curl -X with arbitrary methods COPY and LOCK Port / libcurl / usage-curl-method-arbitrary-copy-lock Failed
Sends arbitrary HTTP methods COPY and LOCK with -X against a handler implementing dispatch via command name and asserts each is received.
curl -X PATCH with explicit body echo Port / libcurl / usage-curl-method-patch-explicit-body Failed
Sends a PATCH with -X and -d against a custom handler and asserts the server echoes the method name and request body.
curl -X TRACE custom method Port / libcurl / usage-curl-method-trace-custom Failed
Sends an HTTP TRACE request via curl -X against a loopback handler that echoes the method and verifies the response confirms TRACE was issued.
curl -F multipart includes well-formed boundary in echoed body Port / libcurl / usage-curl-multipart-explicit-boundary Failed
Posts a curl multipart form, captures the loopback echo of the request body, and verifies both the Content-Type boundary parameter and the matching multipart delimiter line appear in the echoed payload.
curl netrc auth header Port / libcurl / usage-curl-netrc-auth-header-batch11 Failed
curl --next chained POST then GET Port / libcurl / usage-curl-next-chained-post-then-get Failed
Chains a POST and a GET in a single curl invocation using --next to reset request options, and verifies both responses are written to their respective output files.
curl --next chained DELETE then GET Port / libcurl / usage-curl-next-delete-then-get Failed
Chains a DELETE and a GET in a single curl invocation using --next so request method state is reset between transfers, and verifies both responses land in their separate output files with the expected http_code values.
curl next multiple URLs Port / libcurl / usage-curl-next-multiple-urls Failed
Downloads two URLs in a single curl invocation with next separators and verifies both responses are emitted.
curl --no-keepalive disables TCP keepalive Port / libcurl / usage-curl-no-keepalive-connection-close Failed
Runs curl with --no-keepalive against a loopback server and verifies the verbose trace shows TCP_KEEPALIVE was disabled while the body still transfers.
curl --no-progress-meter suppresses progress output Port / libcurl / usage-curl-no-progress-meter-quiet Failed
Confirms --no-progress-meter keeps stdout body intact while emitting no progress meter on stderr (errors still go to stderr separately).
curl --noproxy bypasses --proxy for matched host Port / libcurl / usage-curl-noproxy-bypass-loopback Failed
Configures an unreachable proxy with --proxy plus --noproxy 127.0.0.1, then fetches from a loopback http.server. The request must reach the loopback server directly because the --noproxy match disables the proxy for that host.
curl OPTIONS request Port / libcurl / usage-curl-options-request Failed
curl --output-dir writes to nested directory Port / libcurl / usage-curl-output-dir-flag Failed
Combines curl --output-dir, --create-dirs and --remote-name to download a loopback URL into a freshly-created nested directory and verifies the file landed there.
curl writes output file Port / libcurl / usage-curl-output-file Failed
curl output file body Port / libcurl / usage-curl-output-trailing-newline Failed
Downloads a response with curl -o and verifies the saved body file exists and contains the expected payload string.
curl -Z parallel runs multiple transfers concurrently Port / libcurl / usage-curl-parallel-multi-transfer Failed
Issues two GETs in a single curl invocation with -Z (parallel) so transfers run concurrently against the loopback server, and verifies both response bodies are written to their distinct output files with the expected content.
curl PATCH request Port / libcurl / usage-curl-patch-request Failed
curl posts request body Port / libcurl / usage-curl-post-echo Failed
curl POST empty body Port / libcurl / usage-curl-post-empty-body Failed
curl posts binary file Port / libcurl / usage-curl-post-file-binary Failed
curl --progress-bar emits to stderr Port / libcurl / usage-curl-progress-bar-stderr Failed
Downloads a small loopback resource with --progress-bar and confirms the bar character stream is written to stderr while stdout still contains the body bytes.
curl --proxy through a loopback HTTP proxy Port / libcurl / usage-curl-proxy-loopback-forward Failed
Routes curl through a small loopback HTTP proxy that rewrites the absolute-form request line to an origin server and asserts the proxied response body is returned.
curl PUT echo Port / libcurl / usage-curl-put-echo-batch11 Failed
curl put payload echo Port / libcurl / usage-curl-put-payload-echo Failed
Uploads a file with curl -T using HTTP PUT and verifies the server response echoes the uploaded body.
curl uploads PUT body Port / libcurl / usage-curl-put-upload Failed
curl data urlencode query Port / libcurl / usage-curl-query-data-urlencode-batch11 Failed
curl sends query parameters Port / libcurl / usage-curl-query-params Failed
curl -H 'Expect:' suppresses Expect 100-continue header Port / libcurl / usage-curl-r10-expect-100-disable-header Failed
Compares the request headers a loopback server observes for a 2 KiB POST: the default sends Expect: 100-continue, while -H 'Expect:' suppresses it.
curl -4 forces IPv4 path against localhost Port / libcurl / usage-curl-r10-ipv4-only-loopback Failed
Resolves localhost with -4 (--ipv4) to ensure curl picks the IPv4 loopback and reports remote_ip 127.0.0.1 in --write-out.
curl --no-progress-meter suppresses progress without --silent Port / libcurl / usage-curl-r10-no-progress-meter-suppress Failed
Compares stderr between a default invocation (which prints a progress meter) and one with --no-progress-meter, asserting that --no-progress-meter yields empty stderr while preserving the response body.
curl --oauth2-bearer adds Authorization Bearer header Port / libcurl / usage-curl-r10-oauth2-bearer-header Failed
Sends --oauth2-bearer with a sample token to a loopback server that echoes the request Authorization header, and asserts the header equals "Bearer <token>".
curl --write-out filename_effective matches -O target Port / libcurl / usage-curl-r10-write-out-filename-effective Failed
Uses -O to download a file and asserts %{filename_effective} reports the basename derived from the URL path.
curl --write-out '%header{name}' echoes a specific response header Port / libcurl / usage-curl-r10-write-out-header-token Failed
Hits a loopback server that emits a custom X-Validator-R10 header and asserts curl exposes its value via the %header{X-Validator-R10} write-out token.
curl --write-out reports local_ip and local_port for loopback Port / libcurl / usage-curl-r10-write-out-local-ip-loopback Failed
Verifies that --write-out exposes %{local_ip}=127.0.0.1 for a loopback HTTP transfer and that %{local_port} is a non-zero numeric ephemeral port.
curl --write-out reports HTTP method Port / libcurl / usage-curl-r10-write-out-method-patch Failed
Issues an explicit -X PATCH request to a loopback server and asserts that the --write-out token %{method} echoes back the request method literally.
curl --write-out reports remote_ip and remote_port for loopback Port / libcurl / usage-curl-r10-write-out-remote-ip-loopback Failed
Asserts that --write-out exposes %{remote_ip}=127.0.0.1 and %{remote_port} matching the loopback server port for an HTTP/1.1 request.
curl --write-out response_code reflects 204 No Content Port / libcurl / usage-curl-r10-write-out-response-code-204 Failed
Posts to a loopback server returning 204 No Content and asserts %{response_code} is exactly 204 with no response body printed.
curl --max-filesize aborts download when Content-Length exceeds the cap Port / libcurl / usage-curl-r11-max-filesize-rejects-large Failed
Hosts a 100-byte file on a loopback server and asserts curl --max-filesize 5 exits with code 63 (CURLE_FILESIZE_EXCEEDED) and writes nothing to the output file.
curl --noproxy bypasses an unreachable HTTP_PROXY environment variable Port / libcurl / usage-curl-r11-noproxy-bypasses-env-proxy Failed
Sets HTTP_PROXY to an unreachable address and verifies that --noproxy 127.0.0.1 still allows curl to talk directly to a loopback server, returning HTTP 200.
curl --output-dir + --create-dirs writes into a fresh subdirectory Port / libcurl / usage-curl-r11-output-dir-creates-subdir Failed
Combines --output-dir <fresh path> with --create-dirs and verifies curl creates the missing directory tree and writes the response body into it.
curl --range 0-3 fetches only the first four bytes of a Range-aware server Port / libcurl / usage-curl-r11-range-bytes-prefix Failed
Hosts a 20-byte payload behind a custom loopback handler that honors the Range header and asserts curl --range 0-3 returns exactly the first four bytes "0123" with HTTP 206.
curl --fail on a 404 sets %{exitcode} to 22 (CURLE_HTTP_RETURNED_ERROR) Port / libcurl / usage-curl-r11-write-out-fail-exitcode-22 Failed
Requests a missing path with --fail against a loopback server, captures stderr separately, and asserts the trailing %{exitcode} write-out token reports 22 even though stdout/stderr are split.
curl --write-out '%{http_version}' reports HTTP major version Port / libcurl / usage-curl-r11-write-out-http-version Failed
Issues a GET against a Python loopback HTTP/1.1 server and asserts the %{http_version} write-out token resolves to "1" (curl reports the major HTTP version).
curl --write-out '%{json}' emits a JSON object with documented keys Port / libcurl / usage-curl-r11-write-out-json-keys-shape Failed
Hits a loopback HTTP server with -w '%{json}' and asserts the captured payload parses as a JSON object containing http_code, method, scheme, response_code and exitcode keys.
curl --write-out '%{scheme}' returns uppercase HTTP for plain http URLs Port / libcurl / usage-curl-r11-write-out-scheme-uppercase Failed
Hits a loopback HTTP server and asserts that curl 8.5's %{scheme} write-out token reports the URL scheme in uppercase ("HTTP"), matching the libcurl documented format.
curl --write-out '%{size_upload}' equals the POST body byte count Port / libcurl / usage-curl-r11-write-out-size-upload-post Failed
POSTs a fixed 17-byte payload via --data-binary to a loopback server and asserts %{size_upload} reports exactly 17 bytes uploaded.
curl --write-out '%{time_total}' parses as a strictly positive number Port / libcurl / usage-curl-r11-write-out-time-total-positive Failed
Performs a loopback GET and asserts the %{time_total} write-out token formats as a parseable decimal that is strictly greater than zero.
curl --data-ascii posts the literal payload with a default form content type Port / libcurl / usage-curl-r12-data-ascii-post Failed
Posts a literal payload via curl --data-ascii to a loopback handler that echoes the request body and Content-Type header, asserts the recorded body matches the supplied bytes and the default Content-Type is application/x-www-form-urlencoded.
curl -G -d a=1 -d b=2 builds a GET query string from data fields Port / libcurl / usage-curl-r12-get-with-d-builds-query Failed
Spins up a loopback handler that echoes the request path and method, runs curl -G -d a=1 -d b=2, and asserts the server received GET /echo?a=1&b=2 (data fields concatenated with & into the query string).
curl --ignore-content-length still receives the full body when server reports the length Port / libcurl / usage-curl-r12-ignore-content-length-flag Failed
Fetches a loopback file with --ignore-content-length and verifies curl reports HTTP 200 and the captured bytes match the source byte-for-byte, demonstrating that ignoring the Content-Length header does not truncate the response on a normal connection.
curl --limit-rate caps throughput while still completing the transfer with HTTP 200 Port / libcurl / usage-curl-r12-limit-rate-allows-completion Failed
Serves a small payload from a loopback http.server, fetches it with curl --limit-rate 1M, and asserts the request completes with response_code 200 and the body matches the served bytes despite the artificial rate cap.
curl --post301 -L preserves POST when following a 301 redirect Port / libcurl / usage-curl-r12-post301-keeps-method Failed
Hosts a loopback handler that returns 301 Location -> /target and reports the request method on /target, posts a body via curl -L --post301, and asserts the followed request was still POST (not converted to GET).
curl --retry --retry-delay succeeds against a server that becomes ready on the second request Port / libcurl / usage-curl-r12-retry-delay-respected Failed
Hosts a loopback handler that returns HTTP 503 on the first hit and HTTP 200 on the second, runs curl --retry 2 --retry-delay 1 against /flaky, and asserts the second attempt yields a 200 with the expected body.
curl --trace-ascii --trace-time prefixes trace lines with HH:MM:SS.microseconds timestamps Port / libcurl / usage-curl-r12-trace-time-stamps-lines Failed
Runs a loopback fetch with --trace-ascii path --trace-time, then asserts at least one line in the trace file begins with the documented timestamp prefix HH:MM:SS.MICROSECONDS produced by --trace-time.
curl -w %{size_request} reports the bytes sent in the request line plus headers Port / libcurl / usage-curl-r12-write-out-size-request-post Failed
Posts a known-length body to a loopback handler and asserts %{size_request} is greater than zero and at least as large as the body length, demonstrating the token covers request-line bytes and headers in addition to the body.
curl -L -w %{url_effective} reports the redirected target URL after Location follow Port / libcurl / usage-curl-r12-write-out-url-effective-after-redirect Failed
Hosts a loopback handler that returns 301 Location -> /final and serves /final with HTTP 200, runs curl -L with -w '%{url_effective}', and asserts the captured token is the absolute URL of /final on the test port.
curl -w %{url} echoes the requested URL exactly as supplied on the command line Port / libcurl / usage-curl-r12-write-out-url-token Failed
Fetches a loopback URL with a unique query string and -w '%{url}', asserts curl emits the exact URL passed on the command line as the write-out token even when the body itself goes elsewhere.
curl --form-string keeps a literal @path value as a multipart form field, not a file upload Port / libcurl / usage-curl-r13-form-string-literal-at-r13 Failed
POSTs to a loopback server that echoes the multipart body and asserts that --form-string "marker=@/etc/hostname" sends the literal value "@/etc/hostname" as the form field rather than reading and uploading the referenced file.
curl --header passes multiple custom request headers through to the server Port / libcurl / usage-curl-r13-header-multi-value-passthrough Failed
Hosts a loopback server that echoes selected request headers, sends a request with two -H flags carrying distinct X-Marker-A and X-Marker-B values, and asserts both header values are recorded verbatim in the server's response body.
curl --keepalive-time 60 is accepted and completes the loopback transfer Port / libcurl / usage-curl-r13-keepalive-time-accepted Failed
Fetches a loopback URL with curl --keepalive-time 60 and asserts the response code is 200 and the body matches the served file. Verifies the option is parsed and applied without breaking a normal transfer.
curl -L --max-redirs 3 stops following after three hops and surfaces the documented error Port / libcurl / usage-curl-r13-max-redirs-explicit-three Failed
Hosts a loopback server that returns a 302 chain longer than 3 hops, asserts curl -L --max-redirs 3 fails with exit code 47 (CURLE_TOO_MANY_REDIRECTS) and reports the maximum-redirects diagnostic on stderr, while a separate run with a sufficient budget completes successfully.
curl --no-buffer (-N) writes the response body to the output file unchanged Port / libcurl / usage-curl-r13-no-buffer-fetches-body Failed
Fetches a small file from a loopback HTTP server with curl --no-buffer (-N) and asserts the on-disk output matches the source byte-for-byte and that --no-buffer does not corrupt or truncate the body.
curl --range -3 fetches the trailing 3 bytes of a Range-aware loopback server Port / libcurl / usage-curl-r13-range-suffix-bytes Failed
Hosts a 20-byte payload behind a custom loopback handler that honors the Range header (including suffix-byte ranges of the form bytes=-N), asserts curl --range -3 returns the last three bytes "hij" with HTTP 206.
curl --request PROPFIND sends an arbitrary HTTP method to the server Port / libcurl / usage-curl-r13-request-flag-overrides-method Failed
Posts to a loopback server that echoes self.command and asserts curl --request PROPFIND -X via the long form sends the literal PROPFIND verb in the request line. Confirms --request overrides the default GET.
curl --tcp-fastopen completes a loopback GET with 200 OK Port / libcurl / usage-curl-r13-tcp-fastopen-loopback-200 Failed
Starts a python loopback HTTP server, fetches a small file with curl --tcp-fastopen, asserts the response code is 200 and the body matches the on-disk file byte-for-byte. The kernel may not honor TFO inside the harness, but curl must accept the option and still complete the transfer.
curl --tr-encoding emits the documented TE: gzip request header Port / libcurl / usage-curl-r13-tr-encoding-adds-te-header Failed
Issues a verbose curl request against a loopback server with --tr-encoding, captures the verbose stderr trace, and asserts the request line block contains a literal "TE: gzip" line, confirming curl asks for compressed transfer-encoding.
curl --user-agent sets the User-Agent header to the supplied literal string Port / libcurl / usage-curl-r13-user-agent-explicit-string Failed
Issues a request to a loopback server that echoes the User-Agent header back in the response body and asserts curl --user-agent "validator-r13/1.0" results in the exact User-Agent string being recorded server-side.
curl --connect-to redirects the TCP target while preserving the request URL host Port / libcurl / usage-curl-r14-connect-to-redirects-host Failed
Starts a loopback HTTP server on a high port and uses curl --connect-to "example.com:80:127.0.0.1:<port>" with a request URL of http://example.com/ to make curl connect to the loopback server while still emitting Host: example.com in the request line. Asserts the response is 200 and the body matches the served file.
curl -H @file reads multiple custom headers from a newline-delimited file Port / libcurl / usage-curl-r14-header-from-file-at-prefix Failed
Writes a header file with two custom request headers, runs curl with -H @<file> against a python BaseHTTPRequestHandler that echoes back every received header, and asserts both custom header names and values appear verbatim in the echoed response, demonstrating the @file ingestion path for -H.
curl --json sends a POST with application/json content-type and accept headers Port / libcurl / usage-curl-r14-json-shorthand-post Failed
Issues curl --json '{"a":1}' against a python POST echo handler and asserts the recorded request was a POST whose Content-Type and Accept headers are both application/json (the curl 7.82+ --json shorthand) and whose body equals the supplied JSON literal.
curl --next runs a second request in the same invocation with a separate output file Port / libcurl / usage-curl-r14-multi-next-fetches-two-urls Failed
Issues a single curl invocation that fetches two URLs separated by --next, with each URL's body written to a distinct -o output. Asserts both files are populated with their respective server payloads, demonstrating the per-request reset between --next-delimited requests.
curl --no-progress-meter suppresses the progress UI without --silent Port / libcurl / usage-curl-r14-no-progress-meter-silent-stderr Failed
Fetches a small file from a loopback HTTP server with curl --no-progress-meter (and without -s), captures stderr, and asserts the request succeeds with HTTP 200, the body matches the source byte-for-byte, and the recorded stderr contains no "Total" / "Speed" / "%" progress meter row characters.
curl --output-dir combined with -O writes the URL leaf into the chosen directory Port / libcurl / usage-curl-r14-output-dir-with-remote-name Failed
Combines curl --output-dir with -O (remote name) and asserts that the file is created at <output-dir>/<leaf> using the URL's last path segment as the filename, that the body matches the source byte-for-byte, and that the leaf is not created in the current working directory.
curl --remote-time copies the server Last-Modified onto the saved local file Port / libcurl / usage-curl-r14-remote-time-preserves-mtime Failed
Hosts a file with a fixed mtime via python http.server, fetches it with curl --remote-time, and asserts the saved file's mtime epoch matches the source file's mtime epoch (within a 1-second tolerance) so the Last-Modified header is being honored.
curl --request-target rewrites the HTTP request line path independently of the URL Port / libcurl / usage-curl-r14-request-target-overrides-path Failed
Issues curl with a URL whose path is /placeholder but with --request-target /actual.txt, runs against a python handler that echoes back the request-line path, and asserts the recorded request path is /actual.txt rather than /placeholder.
curl --resolve forces hostname resolution to a specified address and port Port / libcurl / usage-curl-r14-resolve-host-mapping Failed
Starts a loopback HTTP server and fetches the URL http://example.test:<port>/payload.txt with curl --resolve "example.test:<port>:127.0.0.1". Asserts the response is 200 and the body matches the served file, demonstrating the static DNS override.
curl --xattr writes user.xdg.origin.url and user.mime_type onto the saved file Port / libcurl / usage-curl-r14-xattr-records-origin-url Failed
Fetches a file from a loopback HTTP server with curl --xattr, then enumerates the saved file's user-namespace extended attributes via os.listxattr in python and asserts user.xdg.origin.url is present and equals the request URL, and user.mime_type is present.
curl -I -X GET prints response headers without the body even when the method is overridden to GET Port / libcurl / usage-curl-r15-head-x-get-emits-headers-only Failed
Runs curl -I -X GET against a loopback HTTP server, captures stdout, and asserts the captured stream contains the HTTP/1.0 200 status line plus the Content-Length header but does NOT contain the served response body. Pins curl's "headers-only" mode under -I when the method is overridden to GET.
curl --no-clobber keeps an existing -o target intact and writes the download to a sibling .1 path Port / libcurl / usage-curl-r15-no-clobber-keeps-existing Failed
Pre-creates a destination file, runs curl --no-clobber -o <existing> against a loopback server, and asserts the original file is left byte-for-byte intact while the downloaded body lands at <existing>.1, demonstrating curl's collision-avoidance rename behavior.
curl --proto '-all,+http' enables only HTTP and successfully fetches an http:// URL Port / libcurl / usage-curl-r15-proto-allow-only-http Failed
Issues a curl GET against a loopback HTTP server with --proto '-all,+http' so every protocol except HTTP is disabled. Asserts the request still completes with a 200 response code and the body matches the served file, demonstrating the per-protocol allowlist.
curl --raw passes the response body through without internal decoding and reports the raw byte count Port / libcurl / usage-curl-r15-raw-disables-decoding Failed
Fetches a static file from a loopback HTTP server with curl --raw, captures the body to a file plus '%{size_download}' from --write-out, and asserts both the saved file size and the writeout-reported byte count equal the on-disk source file size, demonstrating that --raw disables internal transfer-encoding decoding.
curl --trace-ascii writes a trace file whose lines start with "==" or direction prefixes Port / libcurl / usage-curl-r15-trace-ascii-records-info-lines Failed
Runs a curl GET against a loopback server with --trace-ascii <file>, asserts the produced trace file includes "Info:" lines (preceded by "==") for connection events plus directional markers ("=>" or "<=") for the request/response, demonstrating the human-readable trace dump.
curl --variable + --expand-url substitutes a variable into the request URL at fetch time Port / libcurl / usage-curl-r15-variable-expand-url Failed
Defines a curl variable HOST=127.0.0.1 with --variable, then issues a request whose URL contains "{{HOST}}" with --expand-url. Asserts curl substitutes the variable into the URL at request time and the loopback server delivers the expected body.
curl --write-out '%{num_connects}' reports a single TCP connection for one HTTP fetch Port / libcurl / usage-curl-r15-write-out-num-connects Failed
Runs a single curl GET against a loopback HTTP server with --write-out '%{num_connects}\n' and asserts the captured value is exactly "1", pinning the per-transfer connection-count writeout token's behavior for a one-hop request.
curl --write-out '%{size_header}' reports a positive byte count for the received response headers Port / libcurl / usage-curl-r15-write-out-size-header Failed
Issues a curl GET against a loopback HTTP server with --write-out '%{size_header}\n' and asserts the captured value is a positive integer, demonstrating that curl exposes the total received-header byte count via the size_header writeout token.
curl --write-out '%{time_namelookup}' reports a non-negative seconds.fraction value Port / libcurl / usage-curl-r15-write-out-time-namelookup Failed
Runs a curl GET against a loopback HTTP server with --write-out '%{time_namelookup}' and asserts the captured value is a fixed-point number with a fractional part (matches "<int>.<digits>") and is greater than or equal to zero. Pins the time_namelookup writeout token's numeric format.
curl --write-out '%{url}' echoes the request URL exactly as supplied on the command line Port / libcurl / usage-curl-r15-write-out-url-token Failed
Runs a curl GET against a loopback HTTP server with --write-out 'url=%{url}', captures stdout, and asserts the writeout line equals "url=" followed by the request URL passed to curl. Pins the lossless echo of the input URL by the %{url} token.
curl --data @file sends the file body as the POST payload Port / libcurl / usage-curl-r16-data-at-file-post-body Failed
Builds a small file and asserts that curl --data @file against a loopback echo server posts the file's content as the request body, locking in the @-prefixed --data file-load path. Uses a python http.server subclass that echoes POST bodies back as text.
curl file:// fetches a local file byte-identical to its source Port / libcurl / usage-curl-r16-file-url-md5-equal Failed
Builds a small binary payload and asserts curl with a file:// URL produces output whose sha256 equals the source file's sha256, exercising curl's filesystem-source path without involving any network or HTTP server.
curl -F posts multipart/form-data with named field to a loopback echo Port / libcurl / usage-curl-r16-form-multipart-loopback Failed
Stands up a small python http.server that returns the raw POST body, then issues curl -F 'tag=value-r16' and asserts the resulting body contains both the field name "tag" and the literal value "value-r16" in multipart form encoding.
curl -H sends a custom header that the loopback server echoes back Port / libcurl / usage-curl-r16-header-flag-roundtrip Failed
Stands up a python http.server handler that echoes the X-R16-Token request header value into the response body, then asserts curl -H 'X-R16-Token: alpha-bravo' delivers the same value back to the client byte-for-byte.
curl -L follows a single 302 redirect to the destination body Port / libcurl / usage-curl-r16-location-follows-relative-chain Failed
Stands up a tiny http.server that replies with a 302 Location: /target.txt to the root path and serves a fixed body at /target.txt. Asserts curl -L returns the target body, locking in basic --location single-hop redirect handling.
curl --max-time small value triggers exit 28 on unreachable port Port / libcurl / usage-curl-r16-max-time-tight-throwaway Failed
Issues curl with a 1-second --max-time against a high port that is not bound on the loopback interface and asserts the command exits non-zero with the operation-timeout exit code 28, locking in curl's hard time bound enforcement.
curl -o explicit filename and -O remote-name save identical bytes Port / libcurl / usage-curl-r16-output-flag-vs-remote-name Failed
Hosts a small payload and asserts that "-o local.bin" and "-O" (remote-name) both produce files with the same sha256 — locking in that the two output flags share the same underlying body bytes, only the destination filename differs.
curl --resolve routes a fake hostname to the loopback http.server Port / libcurl / usage-curl-r16-resolve-maps-fake-host Failed
Hosts content on 127.0.0.1 and asserts curl --resolve fake.r16.example:port:127.0.0.1 plus a URL using that hostname returns the loopback body, locking in --resolve's pre-DNS rewrite without depending on /etc/hosts.
curl --write-out %{http_code} prints 200 for a successful loopback GET Port / libcurl / usage-curl-r16-write-out-http-code-200 Failed
Hosts a small payload on a loopback http.server and asserts curl with -w "%{http_code}" emits literally "200" to stdout on a successful GET, locking in the http_code write-out token shape against a known-good endpoint.
curl --user user:pass sends an Authorization Basic header echoed by loopback Port / libcurl / usage-curl-r17-basic-auth-header-echo Failed
Stands up a python http.server that echoes the Authorization request header into the response body, then runs curl --user 'alpha:secret' and confirms the body starts with "Basic " and decodes back to "alpha:secret" via base64.
curl --connect-timeout exits 28 for an unreachable address within the bound Port / libcurl / usage-curl-r17-connect-timeout-unreachable-port Failed
Runs curl with --connect-timeout 1 against a non-routable address (203.0.113.1, TEST-NET-3) and asserts the exit code is 28 — locking in the connect-phase timeout exit code for an unreachable peer.
curl --cookie key=value reaches the loopback server's Cookie header Port / libcurl / usage-curl-r17-cookie-flag-echo Failed
Stands up a python http.server that echoes the Cookie request header into the response body, asserts the server is reachable, then issues curl --cookie 'session=tokenR17' and confirms the response body contains "session=tokenR17".
curl --cookie-jar writes a file then --cookie reuses it on a second request Port / libcurl / usage-curl-r17-cookie-jar-then-reuse Failed
Stands up a python http.server that sets a Set-Cookie header on /set and echoes the inbound Cookie header on /echo, then issues a first curl with --cookie-jar against /set, asserts the jar file exists, and issues a second curl with --cookie <jar> against /echo confirming the cookie roundtrips.
curl --create-dirs --output writes through a not-yet-existing directory tree Port / libcurl / usage-curl-r17-create-dirs-nested-output Failed
Stands up a python http.server serving a small file, then invokes curl --create-dirs --output with a target path under multiple non-existent parent directories and asserts the nested file exists with the expected content.
curl --http1.0 and --http1.1 each fetch a loopback resource successfully Port / libcurl / usage-curl-r17-http10-and-http11-both-succeed Failed
Stands up a python http.server serving a static file, asserts the server is reachable, then issues two curl requests — one with --http1.0 and one with --http1.1 — and confirms both responses match the file's content byte-for-byte.
curl --insecure is accepted on an http URL and fetches the resource normally Port / libcurl / usage-curl-r17-insecure-flag-noop-on-http Failed
Stands up a python http.server serving a small file, then issues curl with --insecure against the plain http URL and asserts the response body matches the served file — locking in that --insecure is a no-op on non-TLS schemes rather than rejected.
curl -X PUT --data sends a body that the loopback PUT handler echoes back Port / libcurl / usage-curl-r17-put-data-roundtrip Failed
Stands up a python http.server with a do_PUT handler that echoes the request body, asserts the server is reachable, then runs curl -X PUT --data 'k=v' and confirms the response body equals "k=v".
curl --silent suppresses progress and --show-error keeps error text on failure Port / libcurl / usage-curl-r17-silent-vs-show-error Failed
Runs curl --silent against a deliberately unreachable port and confirms stderr is empty, then runs curl --silent --show-error against the same target and confirms stderr contains a recognizable error token — locking in the two-flag interaction.
curl --user-agent value reaches a loopback echo server Port / libcurl / usage-curl-r17-user-agent-echo Failed
Stands up a python http.server that echoes the User-Agent request header into the response body, asserts the server is reachable, then issues curl --user-agent "validator/1" and confirms the response body contains the literal "validator/1" token.
curl --data-urlencode percent-escapes reserved characters before sending Port / libcurl / usage-curl-r18-data-urlencode-percent-escapes Failed
Stands up a python loopback http.server that echoes the POST body verbatim, then issues curl with --data-urlencode 'k=a b&c' and asserts the echoed body equals "k=a+b%26c" — locking in curl's application/x-www-form-urlencoded encoding of space (as +) and ampersand (as %26).
curl -X DELETE against a /resource endpoint receives the expected 204 No Content status Port / libcurl / usage-curl-r18-delete-method-status-204 Failed
Stands up a python loopback http.server whose do_DELETE handler returns 204 with no body, issues curl -X DELETE with -w '%{http_code}', and asserts the captured status token equals "204" — locking in the DELETE method dispatch and no-content response handling.
curl -L follows a 302 redirect and returns the final body Port / libcurl / usage-curl-r18-follow-redirect-l-flag Failed
Stands up a python loopback http.server that responds to /go with a 302 Location pointing at /final and to /final with the body "destination", then issues curl -L against /go and asserts the captured body equals "destination" — locking in -L redirect-following behavior.
curl --form sends a multipart/form-data POST whose body carries the field name and value Port / libcurl / usage-curl-r18-form-multipart-field Failed
Stands up a python loopback http.server that echoes the POST body, then issues curl --form 'greeting=hi-there' and asserts the recovered body contains the multipart boundary marker plus both the field name "greeting" and the field value "hi-there".
curl -I prints response headers including Content-Length Port / libcurl / usage-curl-r18-head-flag-content-length Failed
Stands up a python loopback http.server that returns a fixed thirteen-byte body with an explicit Content-Length header, issues curl -I against /size, and asserts the captured output contains both "HTTP/" status and "Content-Length: 13" — locking in HEAD-style header retrieval.
curl --header forwards a custom X-Request-Id header to the server Port / libcurl / usage-curl-r18-header-custom-x-token Failed
Stands up a python loopback http.server that echoes the inbound X-Request-Id request header in the response body, issues curl --header 'X-Request-Id: token-abc-123', and asserts the captured body equals exactly "token-abc-123".
curl -i prepends the HTTP status line and headers to the response body Port / libcurl / usage-curl-r18-include-headers-in-output Failed
Stands up a python loopback http.server that returns the body "payload-only" with a custom X-Trace header, issues curl -i, and asserts the captured output contains the HTTP status line, the custom X-Trace header value, and the body — locking in the -i (include) flag's header-in-output behavior.
curl -o - writes the response body to stdout where the calling shell can capture it Port / libcurl / usage-curl-r18-output-to-stdout-dash Failed
Stands up a python loopback http.server that returns the body "stdout-payload", issues curl with -o - and redirects stdout to a file, and asserts the captured content equals "stdout-payload" — locking in the -o - convention as an explicit stdout sink.
curl --range 4-7 returns the four middle bytes of the response body Port / libcurl / usage-curl-r18-range-middle-bytes Failed
Stands up a python loopback http.server that serves a fixed ten-byte body "0123456789" with explicit Content-Length, issues curl --range 4-7 against it, and asserts the captured output equals exactly "4567" — locking in byte-range request semantics.
curl -w prints the http_code 404 when the loopback server responds with not-found Port / libcurl / usage-curl-r18-write-out-http-code-404 Failed
Stands up a python loopback http.server that returns 404 with an empty body on /missing, then issues curl with -w '%{http_code}' against /missing and asserts the captured token is exactly "404" — locking in the write-out http_code variable on a non-2xx status.
curl --data-urlencode percent-escapes a literal ampersand in the value Port / libcurl / usage-curl-r19-data-urlencode-ampersand Failed
Stands up a python loopback http.server that echoes the POST body, posts with curl --data-urlencode 'q=a&b', and asserts the recovered body equals "q=a%26b" - locking in ampersand-to-%26 percent encoding via --data-urlencode.
curl -g treats square brackets in the URL path as literal characters Port / libcurl / usage-curl-r19-globoff-square-brackets-literal Failed
Stands up a python loopback http.server that echoes the request path in the response body, fetches "/q[1]" with curl -g, and asserts the echoed path equals "/q[1]" - locking in -g globbing-off behavior so bracket characters reach the wire as-is.
curl -I receives Content-Type text/plain from a HEAD-responding loopback server Port / libcurl / usage-curl-r19-head-content-type-text-plain Failed
Stands up a python loopback http.server that returns Content-Type text/plain on HEAD, issues curl -I, and asserts the captured headers contain "Content-Type: text/plain" with no message body bytes - locking in -I HEAD request behavior and header surface.
curl --max-time succeeds on a fast loopback response well under the budget Port / libcurl / usage-curl-r19-max-time-bounds-completion Failed
Stands up a python loopback http.server with an immediate response, issues curl --max-time 10 against /fast, and asserts the response body equals "fast-ok" with exit code 0 - locking in --max-time non-interference when the transfer completes promptly.
curl -X OPTIONS receives the Allow header from a loopback server Port / libcurl / usage-curl-r19-options-method-allow-header Failed
Stands up a python loopback http.server that responds to OPTIONS with an Allow header listing GET, HEAD, OPTIONS, then issues curl -X OPTIONS -i and asserts the captured headers contain "Allow:" with all three methods - locking in OPTIONS method handling and header capture via -i.
curl -o writes the response body byte-for-byte to a named file Port / libcurl / usage-curl-r19-output-file-from-loopback Failed
Stands up a python loopback http.server that returns a known 32-byte payload, fetches with curl -o into a target path, and asserts the on-disk file is exactly 32 bytes and sha256-matches the expected payload - locking in -o output fidelity.
curl POST with an empty body succeeds and observes Content-Length 0 Port / libcurl / usage-curl-r19-post-empty-body-rc-zero Failed
Stands up a python loopback http.server that echoes back the value of the Content-Length request header on POST, issues curl -X POST -d '' with no body, and asserts the captured echo equals "0" and exit code is 0 - locking in empty-body POST behavior.
curl --referer sets the Referer request header observed by the server Port / libcurl / usage-curl-r19-referer-header-echo Failed
Stands up a python loopback http.server that echoes the value of the Referer header in the body, issues curl --referer 'https://example.test/origin', and asserts the recovered body equals that exact URL - locking in --referer header delivery.
curl -w "%{content_type}" surfaces the server-declared Content-Type Port / libcurl / usage-curl-r19-write-out-content-type-json Failed
Stands up a python loopback http.server that returns Content-Type "application/json; charset=utf-8", then issues curl with -w '%{content_type}' and asserts the captured token contains "application/json" - locking in the content_type write-out variable.
curl -w "%{size_download}" reports the body byte count of a fixed payload Port / libcurl / usage-curl-r19-write-out-size-download Failed
Stands up a python loopback http.server that always returns a 13-byte body, then issues curl with -w '%{size_download}' and asserts the captured value is exactly "13" - locking in the size_download write-out variable on a known fixed-size response.
curl --data-binary preserves a payload byte-for-byte through POST to loopback Port / libcurl / usage-curl-r20-data-binary-post-echo Failed
Stands up a python loopback http.server that echoes the POST body, then posts with curl --data-binary @file using a fixed payload containing newlines, and asserts the recovered body matches the source file byte-for-byte - locking in --data-binary's no-transform behavior.
curl -f exits with code 22 when the server returns 404 Port / libcurl / usage-curl-r20-fail-flag-404-rc-22 Failed
Stands up a python loopback http.server that always responds 404 Not Found, then runs curl -f -o /dev/null and asserts curl exits with code 22 - locking in the --fail flag's non-zero exit on HTTP error.
curl -I receives a numeric Content-Length header from loopback Port / libcurl / usage-curl-r20-head-content-length-numeric Failed
Stands up a python loopback http.server that returns a fixed 11-byte body with Content-Length set, then issues curl -I and asserts the response headers contain a "Content-Length: 11" line - locking in HEAD-request header propagation.
curl -i prepends an HTTP/1.x 200 status line to the output body Port / libcurl / usage-curl-r20-include-headers-status-line Failed
Stands up a python loopback http.server that returns 200 OK with a body, then issues curl -i and asserts the captured output begins with an HTTP status line ending in "200" - locking in -i header-inclusion before the body.
curl --range 0-4 fetches the first five bytes from a loopback server Port / libcurl / usage-curl-r20-range-explicit-zero-four Failed
Stands up a python loopback http.server that serves a fixed 16-byte payload, then issues curl --range 0-4 -o file and asserts the recovered file is exactly 5 bytes long and matches the prefix of the payload - locking in client-driven Range request handling.
curl --resolve maps a fake hostname to 127.0.0.1 and fetches a loopback body Port / libcurl / usage-curl-r20-resolve-fake-host Failed
Stands up a python loopback http.server bound to 127.0.0.1, then issues curl with --resolve fake.r20.local:<port>:127.0.0.1 against http://fake.r20.local:<port>/ and asserts the response body equals "ok" - locking in client-side hostname-to-IP override.
curl -A sets a custom User-Agent that the loopback server echoes Port / libcurl / usage-curl-r20-user-agent-flag-echo Failed
Stands up a python loopback http.server that echoes the request's User-Agent header in the response body, then issues curl -A 'validator-r20/1.0' and asserts the recovered body contains the literal "validator-r20/1.0" - locking in -A user-agent override behavior.
curl -w "%{http_code}" surfaces a 201 Created status from a loopback server Port / libcurl / usage-curl-r20-write-out-http-code-201 Failed
Stands up a python loopback http.server that responds 201 Created to POST, then issues curl -X POST -o /dev/null -w '%{http_code}' and asserts the captured value equals "201" - locking in write-out HTTP code reporting on a non-200 success path.
curl -w "%{num_headers}" reports at least one response header Port / libcurl / usage-curl-r20-write-out-num-headers-positive Failed
Stands up a python loopback http.server that returns a small response with several headers, then issues curl -w '%{num_headers}' and asserts the captured value is a positive integer - locking in the num_headers write-out variable.
curl -w "%{size_request}" reports a positive request size for a POST Port / libcurl / usage-curl-r20-write-out-size-request Failed
Stands up a python loopback http.server that accepts POST, then issues curl with a POST body and -w '%{size_request}' and asserts the captured value is a positive integer - locking in the size_request write-out variable on a body-bearing request.
curl --anyauth negotiates to basic auth when only Basic is offered Port / libcurl / usage-curl-r21-anyauth-falls-back-basic Failed
Stands up a python loopback http.server that on first request returns 401 with WWW-Authenticate: Basic realm=r21 and on second request (with Authorization) returns 200 echoing the Authorization header, then issues curl --anyauth -u user:pass and asserts the captured echoed Authorization header begins with "Basic " - locking in --anyauth's challenge-response negotiation falling back to Basic.
curl -K config file applies header and silent flag together Port / libcurl / usage-curl-r21-config-file-multiple-options Failed
Stands up a python loopback http.server that echoes the X-CfgR21 header, writes a multi-line curl config file containing both `silent` and a `header = "X-CfgR21: ok"` directive, then runs curl -K with the config file plus the URL and asserts the captured body is exactly "ok" - locking in multi-option config-file loading distinct from prior config-from-stdin tests.
curl --data-urlencode "key@file" percent-encodes the file contents as the value Port / libcurl / usage-curl-r21-data-urlencode-from-file Failed
Stands up a python loopback http.server that echoes the POST body, writes a tempfile containing "hello world", then issues curl --data-urlencode "msg@<file>" and asserts the echoed body equals "msg=hello+world" (curl renders space as "+" in application/x-www-form-urlencoded) - locking in --data-urlencode's filename-source ("@file") encoding behavior.
curl -H "X-Empty;" emits the named header with empty value Port / libcurl / usage-curl-r21-empty-header-via-semicolon Failed
Stands up a python loopback http.server that echoes the received X-Empty header value into the response body, then issues curl -H "X-Empty;" (the semicolon syntax to force an empty-value header) and asserts the server saw the X-Empty header present with an empty string - locking in libcurl's empty-header injection via the semicolon syntax.
curl --get combines two -d fragments into one ampersand-joined query Port / libcurl / usage-curl-r21-get-multiple-d-build-query Failed
Stands up a python loopback http.server that echoes the request path, then issues curl --get with two separate -d "k1=v1" -d "k2=v2" flags against it and asserts the path echoed back includes "k1=v1&k2=v2" - locking in --get's multi-fragment query assembly behavior at two fragments specifically.
curl -o - writes a 256-byte binary payload to stdout byte-for-byte Port / libcurl / usage-curl-r21-output-dash-stdout-binary Failed
Stands up a python loopback http.server returning a 256-byte payload covering bytes 0x00-0xFF, issues curl -o - (explicit stdout) capturing into a file, and asserts the captured bytes match the source payload by SHA-256 - locking in -o - explicit-stdout dispatch on a binary payload distinct from prior -o-to-stdout-dash tests using ASCII bodies.
curl -w "%{num_headers}" reports at least three response headers on loopback Port / libcurl / usage-curl-r21-write-out-num-headers-positive Failed
Stands up a python loopback http.server that returns Content-Type, Content-Length, and X-Marker headers, then issues curl -w '%{num_headers}' and asserts the captured number is >= 3 - locking in num_headers write-out token reporting (existing num-headers-positive test is simpler - this version asserts a specific lower bound).
curl -w "%{response_code}" surfaces the HTTP status as the http_code alias Port / libcurl / usage-curl-r21-write-out-response-code-alias Failed
Stands up a python loopback http.server that returns 200 OK, then issues curl -w '%{response_code}' against it and asserts the captured value is "200" - locking in the response_code write-out token (alias for http_code) which is distinct from the existing http_code-201/204/404/200 tests by exercising the alias form specifically.
curl -w "%{size_header}" reports a positive numeric byte count on loopback Port / libcurl / usage-curl-r21-write-out-size-header-numeric Failed
Stands up a python loopback http.server returning a small body, issues curl -w '%{size_header}' against it, and asserts the captured value is a positive integer greater than 30 (since headers always include Content-Length and HTTP/1.x status line) - locking in size_header write-out reporting (existing size-header test from r15 exists; this version pins a numeric lower bound).
curl -w "%{url_effective}" emits the full http://127.0.0.1:port/path URL after request Port / libcurl / usage-curl-r21-write-out-url-effective-shape Failed
Stands up a python loopback http.server, issues curl -w '%{url_effective}' against a /alpha path, and asserts the captured URL equals exactly the request URL string - locking in url_effective on a non-redirect path (existing url-effective-after-redirect test covers redirected URLs; this exercises the no-redirect case).
curl --data @file reads from disk Port / libcurl / usage-curl-r9-data-from-file-prefix Failed
Posts a body sourced from a file via --data @path against an echo server and confirms the body contents arrived without the @ prefix.
curl multipart form with multiple fields Port / libcurl / usage-curl-r9-form-multiple-fields Failed
POSTs two --form fields to a loopback echo server and verifies both Content-Disposition headers and field values appear in the multipart body.
curl OPTIONS reads Allow header Port / libcurl / usage-curl-r9-options-method-allow Failed
Sends an HTTP OPTIONS request to a loopback server and verifies the Allow header is parsed and dumped to stdout via -i.
curl --output-dir with --create-dirs Port / libcurl / usage-curl-r9-output-dir-with-create Failed
Downloads a payload into a deeply nested output directory using --output-dir and --create-dirs and verifies curl created the directory tree.
curl PUT with --upload-file Port / libcurl / usage-curl-r9-put-upload-file Failed
Uploads a small file via PUT against a loopback server that echoes the body and verifies the request method and payload were transmitted.
curl --range fetches trailing bytes Port / libcurl / usage-curl-r9-range-bytes-tail Failed
Requests the trailing 5 bytes of a known payload via --range against a loopback server and validates the partial response matches the file tail.
curl --resolve rewrites a custom host Port / libcurl / usage-curl-r9-resolve-rewrites-host Failed
Uses --resolve to point a synthetic hostname at 127.0.0.1 and verifies the request reaches a local server while the Host header reflects the synthetic name.
curl --write-out reports header_size Port / libcurl / usage-curl-r9-write-out-content-length Failed
Issues a HEAD request and validates that --write-out exposes a positive %{size_header} value reflecting the response header bytes.
curl --write-out reports num_redirects Port / libcurl / usage-curl-r9-write-out-num-redirects Failed
Follows a chain of two server-side redirects and validates curl exposes the expected redirect count via %{num_redirects}.
curl --write-out reports size_download Port / libcurl / usage-curl-r9-write-out-size-download Failed
Downloads a known-length payload from a loopback server and verifies curl emits the exact byte count via %{size_download}.
curl range explicit bytes Port / libcurl / usage-curl-range-explicit-bytes Failed
Issues an explicit bytes range request through curl -r and verifies the partial body matches the requested slice.
curl --range starting from middle of file Port / libcurl / usage-curl-range-from-offset Failed
Issues an open-ended range starting from a middle offset with curl --range and verifies the loopback server returned only the suffix bytes.
curl --range with multiple ranges Port / libcurl / usage-curl-range-multiple-ranges Failed
Issues a multi-range request with curl --range and verifies the loopback server returned a 206 multipart/byteranges body containing every requested slice.
curl range request Port / libcurl / usage-curl-range-request Failed
curl --range 0-3 reads file prefix Port / libcurl / usage-curl-range-static-prefix-bytes Failed
Requests bytes 0-3 of a static loopback resource via --range and verifies only the first four bytes of the body are returned.
curl --rate limits serial request rate Port / libcurl / usage-curl-rate-limit-multi-transfer Failed
Issues two URLs in one curl invocation with --rate "120/m" and verifies both transfers complete with status 200.
curl redirect count writeout Port / libcurl / usage-curl-redirect-count-writeout Failed
curl follows redirect Port / libcurl / usage-curl-redirect Failed
curl referer header Port / libcurl / usage-curl-referer-header Failed
Sends a Referer header with curl and verifies the server receives the configured origin URL.
curl remote header name Port / libcurl / usage-curl-remote-header-name Failed
Downloads a response with Content-Disposition and verifies curl saves the server-provided filename.
curl --remote-name-all saves multiple URLs Port / libcurl / usage-curl-remote-name-all-multi Failed
Downloads two loopback URLs in a single curl invocation with --remote-name-all and verifies both files appear with their remote-derived names and expected contents.
curl remote name output Port / libcurl / usage-curl-remote-name Failed
curl --remove-on-error removes partial output Port / libcurl / usage-curl-remove-on-error-deletes-output Failed
Talks to a loopback server that advertises a longer Content-Length than it sends so curl reports a transfer-closed error after writing some bytes. Without --remove-on-error the partial file is kept; with --remove-on-error curl deletes it. Verifies both behaviors.
curl --request-target absolute form Port / libcurl / usage-curl-request-target-absolute Failed
Forces curl to send an absolute-form request target via --request-target and verifies the loopback server received the override path verbatim.
curl resolve loopback host Port / libcurl / usage-curl-resolve-loopback-host-batch11 Failed
curl retry on transient failure Port / libcurl / usage-curl-retry-success Failed
Retries a transient HTTP 503 response with curl and verifies the eventual successful body.
curl --retry 0 does not retry 5xx Port / libcurl / usage-curl-retry-zero-no-retry-5xx Failed
Hits a loopback handler that increments a counter on every request and verifies that --retry 0 --fail produces exactly one request even on a 503.
curl silent fail missing Port / libcurl / usage-curl-silent-fail-missing Failed
curl --ssl-no-revoke accepted on plain HTTP Port / libcurl / usage-curl-ssl-no-revoke-http-noop Failed
Confirms --ssl-no-revoke is parsed and is a no-op against plain HTTP loopback transfers, returning the expected payload.
curl verbose stderr trace Port / libcurl / usage-curl-stderr-verbose-info Failed
Runs curl with -v and verifies the verbose stderr stream contains both the request line and the response status header.
curl --tcp-fastopen accepted on plain HTTP Port / libcurl / usage-curl-tcp-fastopen-accepted Failed
Confirms --tcp-fastopen is accepted by curl and the underlying transfer still completes successfully against a loopback server.
curl --tcp-nodelay completes a loopback transfer with 200 Port / libcurl / usage-curl-tcp-nodelay Failed
Issues a curl request with --tcp-nodelay to a loopback server and verifies the response body and http_code are returned correctly with TCP_NODELAY enabled.
curl --time-cond sends If-Modified-Since header Port / libcurl / usage-curl-time-cond-newer Failed
Uses curl --time-cond with an explicit RFC 1123 timestamp and verifies the loopback server observes a matching If-Modified-Since request header and returns 200 with the payload.
curl ASCII trace Port / libcurl / usage-curl-trace-ascii Failed
Records an ASCII request trace with curl and verifies the captured trace includes the outgoing HTTP request line.
curl TRACE request Port / libcurl / usage-curl-trace-request Failed
curl --unix-socket transport Port / libcurl / usage-curl-unix-socket-loopback Failed
Starts a Python HTTPServer bound to a UNIX domain socket and verifies curl --unix-socket transports an HTTP GET over the AF_UNIX path.
curl upload file Port / libcurl / usage-curl-upload-file Failed
curl uploads stdin Port / libcurl / usage-curl-upload-stdin Failed
Streams request body bytes from stdin with curl upload mode and verifies the server receives the full payload.
curl URL globbing brace expansion Port / libcurl / usage-curl-url-glob-brace Failed
Uses curl URL globbing with {a,b} brace syntax to fetch multiple loopback paths in one invocation and verifies both bodies are written to numbered output files.
curl URL-encoded post Port / libcurl / usage-curl-urlencoded-post Failed
curl user agent header Port / libcurl / usage-curl-user-agent-header-batch11 Failed
curl sends user agent Port / libcurl / usage-curl-user-agent-header Failed
curl --variable expanded into POST data Port / libcurl / usage-curl-variable-expand-data Failed
Defines a curl 8.x --variable and references it via --expand-data so the substituted value reaches the loopback server in the POST body.
curl --variable name@file expands file contents into a header Port / libcurl / usage-curl-variable-from-file Failed
Defines a curl 8.x --variable from a file (name@path) and expands it into a request header so the loopback server sees the file's contents in the echoed header value.
curl -v with --silent keeps verbose trace Port / libcurl / usage-curl-verbose-silent-combo Failed
Combines curl -v and --silent and verifies the verbose trace still reaches stderr while the progress meter is suppressed and stdout carries only the response body.
curl reports protocol support Port / libcurl / usage-curl-version-features Failed
curl write-out status Port / libcurl / usage-curl-write-out-status Failed
Requests a text response with curl --write-out and verifies the reported status code and content type summary.
curl reports write-out metrics Port / libcurl / usage-curl-write-out Failed
curl write-out content type Port / libcurl / usage-curl-writeout-content-type Failed
curl -w %{exitcode}/%{errormsg} reports failure details Port / libcurl / usage-curl-writeout-exitcode-errormsg Failed
Forces a file:// open failure for a missing path and uses -w '%{exitcode}|%{errormsg}' to verify the writeout reports a non-zero libcurl exit code and a non-empty error message string.
curl write-out emits header JSON Port / libcurl / usage-curl-writeout-header-json Failed
Uses curl -w '%{header_json}' to dump response headers as JSON and verifies a custom header from the loopback server appears as a JSON key.
curl write-out reports HTTP version Port / libcurl / usage-curl-writeout-http-version Failed
Captures the negotiated HTTP version from a loopback server through curl -w '%{http_version}' and asserts it is 1.1.
curl write-out %{json} document Port / libcurl / usage-curl-writeout-json-template Failed
Uses curl -w '%{json}' to dump the full transfer document and verifies the resulting JSON parses and contains the http_code field for a loopback GET.
curl writeout num headers Port / libcurl / usage-curl-writeout-num-headers Failed
Captures the num_headers writeout variable from curl and verifies a positive header count is reported.
curl writeout zero redirects Port / libcurl / usage-curl-writeout-num-redirects-zero Failed
Verifies the num_redirects writeout reports zero when the server response does not redirect.
curl -w %{redirect_url} on 301 reports the Location target Port / libcurl / usage-curl-writeout-redirect-url-301 Failed
Issues a request without -L against a custom server that returns 301 with a Location header and asserts curl -w '%{redirect_url}' prints the absolute redirect target.
curl -w %{scheme} reports FILE for file URL Port / libcurl / usage-curl-writeout-scheme-file Failed
Performs a file:// fetch with -w '%{scheme}' and asserts the writeout reports the upper-case scheme name FILE that libcurl uses for the file protocol.
curl writeout size download Port / libcurl / usage-curl-writeout-size-download Failed
Downloads a fixed-size response and verifies the size_download writeout reports the exact byte count.
curl write-out size upload on POST Port / libcurl / usage-curl-writeout-size-upload Failed
Posts a fixed-size body to a loopback server and verifies curl -w '%{size_upload}' reports the same byte count that was sent.
curl write-out size Port / libcurl / usage-curl-writeout-size Failed
curl -w %{ssl_verify_result} on plain HTTP returns 0 Port / libcurl / usage-curl-writeout-ssl-verify-result-plain Failed
Requests plain HTTP from a loopback server and asserts curl -w '%{ssl_verify_result}' prints 0 because no TLS handshake happened.
curl --write-out '%{stderr}...' routes summary to stderr Port / libcurl / usage-curl-writeout-stderr Failed
Uses curl -w '%{stderr}msg-...' so the write-out template is emitted on stderr while the HTTP response body still goes to stdout/file, and verifies stdout, stderr, and http_code are all correct.
curl -w @file reads write-out template from a file Port / libcurl / usage-curl-writeout-template-from-file Failed
Stores a write-out template in a file then invokes curl with -w @file against a file:// URL, asserting the rendered output substitutes %{size_download}, %{scheme}, and %{url_effective} from the loaded template.
curl write-out time variables Port / libcurl / usage-curl-writeout-time-fields Failed
Uses curl -w to print %{time_total}, %{time_namelookup}, and %{time_connect} for a loopback fetch and verifies all three are present and parseable as non-negative floating point values.
CVE-2014-8150 libcurl regression Port / libcurl / cve-2014-8150 Failed
Asserts that curl rejects URLs containing literal CR/LF bytes with a "Malformed input to a URL function" error rather than embedding them into the outgoing request line, which is the CRLF-injection vector the patch closed.
CVE-2023-27533 libcurl regression Port / libcurl / cve-2023-27533 Failed
Asserts that curl rejects telnet URLs whose user/option strings contain CR/LF characters, preventing the IAC-injection vector that the patch closed.
CVE-2024-2004 libcurl regression Port / libcurl / cve-2024-2004 Failed
Asserts that curl --proto refuses a scheme that is not in the allow list ("Protocol not supported or disabled in libcurl") rather than silently transferring with a disabled protocol.