From fc7505122f02b4f93f405e90da9da9fcf7ef817d Mon Sep 17 00:00:00 2001 From: antao Date: Thu, 23 May 2019 16:07:08 +0800 Subject: [PATCH] Update the submodule trantor --- examples/simple_example/api_v1_ApiTest.cc | 6 ------ examples/simple_example_test/main.cc | 4 ++-- format.sh | 1 + lib/src/FiltersFunction.cc | 2 +- lib/src/Utilities.cc | 6 +----- lib/tests/GzipTest.cc | 6 ------ trantor | 2 +- 7 files changed, 6 insertions(+), 21 deletions(-) diff --git a/examples/simple_example/api_v1_ApiTest.cc b/examples/simple_example/api_v1_ApiTest.cc index d2d437b2..1576315e 100644 --- a/examples/simple_example/api_v1_ApiTest.cc +++ b/examples/simple_example/api_v1_ApiTest.cc @@ -89,7 +89,6 @@ void ApiTest::get2(const HttpRequestPtr &req, "usr\n" "var\n" "vm\n" - "用户信息\n" "\n" "/Applications:\n" "Adobe\n" @@ -140,7 +139,6 @@ void ApiTest::get2(const HttpRequestPtr &req, "MyEclipse 2015\n" "Notes.app\n" "OmniGraffle.app\n" - "PP助手.app\n" "Pages.app\n" "Photo Booth.app\n" "Photos.app\n" @@ -183,9 +181,6 @@ void ApiTest::get2(const HttpRequestPtr &req, "iTunes.app\n" "pgAdmin 4.app\n" "wechatwebdevtools.app\n" - "搜狐影音.appdownload\n" - "网易有道词典.app\n" - "万能数据恢复大师.app\n" "\n" "/Applications/Adobe:\n" "Flash Player\n" @@ -214,7 +209,6 @@ void ApiTest::get2(const HttpRequestPtr &req, "Locales\n" "Plug-ins\n" "Presets\n" - "卸载 Adobe Photoshop CC\n" "\n" "/Applications/Adobe Photoshop CC/Adobe Photoshop CC.app:\n" "Contents\n" diff --git a/examples/simple_example_test/main.cc b/examples/simple_example_test/main.cc index 928e4e70..74e4775b 100644 --- a/examples/simple_example_test/main.cc +++ b/examples/simple_example_test/main.cc @@ -144,7 +144,7 @@ void doTest(const HttpClientPtr &client, [=](ReqResult result, const HttpResponsePtr &resp) { if (result == ReqResult::Ok) { - if (resp->getBody().length() == 5123) + if (resp->getBody().length() == 4994) { outputGood(req, isHttps); } @@ -566,7 +566,7 @@ void doTest(const HttpClientPtr &client, [=](ReqResult result, const HttpResponsePtr &resp) { if (result == ReqResult::Ok) { - if (resp->getBody().length() == 5123) + if (resp->getBody().length() == 4994) { outputGood(req, isHttps); } diff --git a/format.sh b/format.sh index c226aba6..da6664c0 100755 --- a/format.sh +++ b/format.sh @@ -1,3 +1,4 @@ #!/bin/sh +find lib orm_lib examples drogon_ctl -name *.h -o -name *.cc -exec dos2unix {} \; find lib orm_lib examples drogon_ctl -name *.h -o -name *.cc|xargs clang-format -i -style=file diff --git a/lib/src/FiltersFunction.cc b/lib/src/FiltersFunction.cc index 44d7f286..8cd4ef93 100644 --- a/lib/src/FiltersFunction.cc +++ b/lib/src/FiltersFunction.cc @@ -95,5 +95,5 @@ void doFilters( std::move(missCallback)); } -} // namespace FiltersFunction +} // namespace filters_function } // namespace drogon \ No newline at end of file diff --git a/lib/src/Utilities.cc b/lib/src/Utilities.cc index 3838d330..d2745295 100644 --- a/lib/src/Utilities.cc +++ b/lib/src/Utilities.cc @@ -506,13 +506,10 @@ std::string urlDecode(const char *begin, const char *end) x2 = x2 - 'A' + 10; } hex = x1 * 16 + x2; - //字母和数字[0-9a-zA-Z]、一些特殊符号[$-_.+!*'(),] - //、以及某些保留字[$&+,/:;=?@] - //可以不经过编码直接用于URL if (!((hex >= 48 && hex <= 57) || // 0-9 (hex >= 97 && hex <= 122) || // a-z (hex >= 65 && hex <= 90) || // A-Z - //一些特殊符号及保留字[$-_.+!*'(),] [$&+,/:;?@] + //[$-_.+!*'(),] [$&+,/:;?@] hex == 0x21 || hex == 0x24 || hex == 0x26 || hex == 0x27 || hex == 0x28 || hex == 0x29 || hex == 0x2a || hex == 0x2b || hex == 0x2c || @@ -594,7 +591,6 @@ std::shared_ptr gzipDecompress( { decompressed->resize(decompressed->length() * 2); } - // chadeltu 加了(Bytef *) strm.next_out = (Bytef *)decompressed->data() + strm.total_out; strm.avail_out = decompressed->length() - strm.total_out; // Inflate another chunk. diff --git a/lib/tests/GzipTest.cc b/lib/tests/GzipTest.cc index 4b12f98d..ef27cce2 100644 --- a/lib/tests/GzipTest.cc +++ b/lib/tests/GzipTest.cc @@ -28,7 +28,6 @@ int main() "usr\n" "var\n" "vm\n" - "用户信息\n" "\n" "/Applications:\n" "Adobe\n" @@ -79,7 +78,6 @@ int main() "MyEclipse 2015\n" "Notes.app\n" "OmniGraffle.app\n" - "PP助手.app\n" "Pages.app\n" "Photo Booth.app\n" "Photos.app\n" @@ -122,9 +120,6 @@ int main() "iTunes.app\n" "pgAdmin 4.app\n" "wechatwebdevtools.app\n" - "搜狐影音.appdownload\n" - "网易有道词典.app\n" - "万能数据恢复大师.app\n" "\n" "/Applications/Adobe:\n" "Flash Player\n" @@ -153,7 +148,6 @@ int main() "Locales\n" "Plug-ins\n" "Presets\n" - "卸载 Adobe Photoshop CC\n" "\n" "/Applications/Adobe Photoshop CC/Adobe Photoshop CC.app:\n" "Contents\n" diff --git a/trantor b/trantor index 2d976d3f..b8be70be 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 2d976d3f291da9a000fdcf4e422fa32eee957639 +Subproject commit b8be70be4b626fcaf59c2d5919c634392790d315