From d0b9d9c1d6e87d360b821ebef9315ca2107aa23c Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 2 Dec 2017 11:41:20 -0800 Subject: [PATCH] content-encoding; try cargo tarpaulin --- .travis.yml | 29 ++++++++++++++++------------- guide/src/SUMMARY.md | 3 +-- guide/src/qs_7.md | 16 +++++++++++++++- guide/src/qs_8.md | 1 - 4 files changed, 32 insertions(+), 17 deletions(-) delete mode 100644 guide/src/qs_8.md diff --git a/.travis.yml b/.travis.yml index a1b3c431e..68d29e255 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,18 +49,21 @@ after_success: - | if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "stable" ]]; then - wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && - tar xzf master.tar.gz && - cd kcov-master && - mkdir build && - cd build && - cmake .. && - make && - make install DESTDIR=../../kcov-build && - cd ../.. && - rm -rf kcov-master && - for file in target/debug/actix_web-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && - for file in target/debug/test_*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && - bash <(curl -s https://codecov.io/bash) && + bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh) + cargo tarpaulin --out Xml + bash <(curl -s https://codecov.io/bash) + #wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && + #tar xzf master.tar.gz && + #cd kcov-master && + #mkdir build && + #cd build && + #cmake .. && + #make && + #make install DESTDIR=../../kcov-build && + #cd ../.. && + #rm -rf kcov-master && + #for file in target/debug/actix_web-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && + #for file in target/debug/test_*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && + #bash <(curl -s https://codecov.io/bash) && echo "Uploaded code coverage" fi diff --git a/guide/src/SUMMARY.md b/guide/src/SUMMARY.md index 93a265a42..4a820e160 100644 --- a/guide/src/SUMMARY.md +++ b/guide/src/SUMMARY.md @@ -6,8 +6,7 @@ - [Handler](./qs_4.md) - [Resources and Routes](./qs_5.md) - [Application state](./qs_6.md) -- [Request](./qs_7.md) -- [Response](./qs_8.md) +- [Request & Response](./qs_7.md) - [WebSockets](./qs_9.md) - [User sessions](./qs_10.md) - [Logging](./qs_11.md) diff --git a/guide/src/qs_7.md b/guide/src/qs_7.md index 0d92e9fdd..b5b91d599 100644 --- a/guide/src/qs_7.md +++ b/guide/src/qs_7.md @@ -1 +1,15 @@ -# Request +# HttpRequest & HttpResponse + +## Content encoding + +Actix automatically *compress*/*decompress* payload. +Following encodings are supported: + + * Brotli + * Gzip + * Deflate + * Identity + + If request headers contains `Content-Encoding` header, request payload get decompressed + according to header value. Multiple codecs are not supported, i.e: `Content-Encoding: br, gzip`. + diff --git a/guide/src/qs_8.md b/guide/src/qs_8.md deleted file mode 100644 index 465fa3626..000000000 --- a/guide/src/qs_8.md +++ /dev/null @@ -1 +0,0 @@ -# Response