mirror of
https://github.com/ducaale/xh.git
synced 2025-05-05 15:32:50 +00:00
apply suggestion
This commit is contained in:
parent
e9a386f460
commit
670a5ba096
@ -187,7 +187,7 @@ Example: --print=Hb"
|
||||
///
|
||||
/// Compression is skipped if it appears that compression ratio is negative.
|
||||
/// Compression can be forced by repeating this option.
|
||||
/// Note: Compression cannot be forced if the Content-Encoding request header is present.
|
||||
/// Note: Compression cannot be used if the Content-Encoding request header is present.
|
||||
#[clap(short = 'x', long = "compress", name = "compress", action = ArgAction::Count)]
|
||||
pub compress: u8,
|
||||
|
||||
|
@ -512,6 +512,7 @@ fn run(args: Cli) -> Result<i32> {
|
||||
|
||||
if args.compress >= 1 {
|
||||
if request.headers().contains_key(CONTENT_ENCODING) {
|
||||
// HTTPie overrides the original Content-Encoding header in this case
|
||||
log::warn!("--compress can't be used with a 'Content-Encoding:' header. --compress will be disabled.");
|
||||
} else if let Some(body) = request.body_mut() {
|
||||
// TODO: Compress file body (File) without buffering
|
||||
|
Loading…
x
Reference in New Issue
Block a user