瀏覽代碼

clangformat

yhirose 11 月之前
父節點
當前提交
b766025a83
共有 2 個文件被更改,包括 2 次插入3 次删除
  1. 1 1
      httplib.h
  2. 1 2
      test/test.cc

+ 1 - 1
httplib.h

@@ -5166,7 +5166,7 @@ inline bool range_error(Request &req, Response &res) {
       // representation).
       // representation).
       // https://www.rfc-editor.org/rfc/rfc9110.html#section-14.1.2-6
       // https://www.rfc-editor.org/rfc/rfc9110.html#section-14.1.2-6
       if (last_pos == -1 || last_pos >= contant_len) {
       if (last_pos == -1 || last_pos >= contant_len) {
-          last_pos = contant_len - 1;
+        last_pos = contant_len - 1;
       }
       }
 
 
       // Range must be within content length
       // Range must be within content length

+ 1 - 2
test/test.cc

@@ -3804,8 +3804,7 @@ TEST_F(ServerTest, GetStreamedWithRangeError) {
 TEST_F(ServerTest, GetRangeWithMaxLongLength) {
 TEST_F(ServerTest, GetRangeWithMaxLongLength) {
   auto res = cli_.Get(
   auto res = cli_.Get(
       "/with-range",
       "/with-range",
-      {{"Range",
-        "bytes=0-" + std::to_string(std::numeric_limits<long>::max())},
+      {{"Range", "bytes=0-" + std::to_string(std::numeric_limits<long>::max())},
        {"Accept-Encoding", ""}});
        {"Accept-Encoding", ""}});
   ASSERT_TRUE(res);
   ASSERT_TRUE(res);
   EXPECT_EQ(StatusCode::PartialContent_206, res->status);
   EXPECT_EQ(StatusCode::PartialContent_206, res->status);