Learn R Programming

reproducible (version 3.2.1)

.probeRange: Probe a URL for size and HTTP Range support

Description

Internal helper for the parallel ranged download path. Sends a HEAD request and reads Content-Length and Accept-Ranges. Any failure (HEAD not supported, timeout, httr2 unavailable) returns size = NA / acceptRanges = FALSE, which the caller treats as "use single-stream".

Usage

.probeRange(url, verbose = getOption("reproducible.verbose", 1))

Value

A list with size (numeric, bytes or NA) and acceptRanges

(logical).

Arguments

url

The URL to probe.

verbose

Numeric verbosity level.