Skip to content

Commit

Permalink
usingcurl/downloads/compression.md: expand, for upload and headers
Browse files Browse the repository at this point in the history
Closes #355
  • Loading branch information
bagder committed Dec 16, 2023
1 parent 430f82d commit df47615
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions index-words
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--anyauth
--basic
--compressed
--compressed-ssh
--connect-timeout
--connect-to
--data
Expand Down
16 changes: 16 additions & 0 deletions usingcurl/downloads/compression.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit df47615

Please sign in to comment.