From df47615d7ec1495e32dbbc1430124d2b40caa1ab Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 16 Dec 2023 20:12:35 +0100 Subject: [PATCH] usingcurl/downloads/compression.md: expand, for upload and headers Closes #355 --- index-words | 1 + usingcurl/downloads/compression.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/index-words b/index-words index 5d75a15170..44a946f08b 100644 --- a/index-words +++ b/index-words @@ -3,6 +3,7 @@ --anyauth --basic --compressed +--compressed-ssh --connect-timeout --connect-to --data diff --git a/usingcurl/downloads/compression.md b/usingcurl/downloads/compression.md index 515c02dff1..e583e5cda3 100644 --- a/usingcurl/downloads/compression.md +++ b/usingcurl/downloads/compression.md @@ -30,3 +30,19 @@ In theory, there is nothing that prevents you from using both in the same command line, although in practice, you may then experience that some servers get a little confused when ask to compress in two different ways. It is generally safer to just pick one. + +For SCP and SFTP transfers, there is `--compressed-ssh`. It compresses all +traffic in either direction. + +## HTTP headers + +HTTP/1.x headers cannot be compressed. HTTP/2 and HTTP/3 headers on the other +hands are always compressed and cannot be sent uncompressed. However, as a +convenience to users, curl will always show the headers uncompressed in a +style similar to how they look for HTTP/1.x to make the output and look +consistent. + +## Uploads + +For HTTP there is no standard way to do compression. The above mentioned HTTP +compression methods only work for downloads.