summaryrefslogtreecommitdiff
path: root/docs/cmdline-opts/range.d
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-28 00:50:25 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-28 00:50:25 +0100
commit5c4a526388e5d45f332d241b03114eaff98c53ce (patch)
treee6f7e4c19074b9a892b5d3c80aaed6722f8c096d /docs/cmdline-opts/range.d
parent720ea577dc2f850c24adbba463e307eed017bc11 (diff)
downloadgnurl-5c4a526388e5d45f332d241b03114eaff98c53ce.tar.gz
gnurl-5c4a526388e5d45f332d241b03114eaff98c53ce.tar.bz2
gnurl-5c4a526388e5d45f332d241b03114eaff98c53ce.zip
cmdline-opts: more command line options documented
Moved over to the new format
Diffstat (limited to 'docs/cmdline-opts/range.d')
-rw-r--r--docs/cmdline-opts/range.d46
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/cmdline-opts/range.d b/docs/cmdline-opts/range.d
new file mode 100644
index 000000000..760d15e22
--- /dev/null
+++ b/docs/cmdline-opts/range.d
@@ -0,0 +1,46 @@
+Long: range
+Short: r
+Help: Retrieve only the bytes within RANGE
+Arg: <range>
+Protocols: HTTP FTP SFTP FILE
+---
+Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP
+server or a local FILE. Ranges can be specified in a number of ways.
+.RS
+.TP 10
+.B 0-499
+specifies the first 500 bytes
+.TP
+.B 500-999
+specifies the second 500 bytes
+.TP
+.B -500
+specifies the last 500 bytes
+.TP
+.B 9500-
+specifies the bytes from offset 9500 and forward
+.TP
+.B 0-0,-1
+specifies the first and last byte only(*)(HTTP)
+.TP
+.B 100-199,500-599
+specifies two separate 100-byte ranges(*) (HTTP)
+.RE
+.IP
+(*) = NOTE that this will cause the server to reply with a multipart
+response!
+
+Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
+\&'start-stop' range syntax. If a non-digit character is given in the range,
+the server's response will be unspecified, depending on the server's
+configuration.
+
+You should also be aware that many HTTP/1.1 servers do not have this feature
+enabled, so that when you attempt to get a range, you'll instead get the whole
+document.
+
+FTP and SFTP range downloads only support the simple 'start-stop' syntax
+(optionally with one of the numbers omitted). FTP use depends on the extended
+FTP command SIZE.
+
+If this option is used several times, the last one will be used.