mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 06:26:02 -07:00
Removed unnecessary CRLF at the end of multipart ranges data
This commit is contained in:
parent
e699bd0730
commit
01b90829bc
2 changed files with 5 additions and 5 deletions
|
@ -4530,7 +4530,7 @@ bool process_multipart_ranges_data(const Request &req, Response &res,
|
|||
|
||||
ctoken("--");
|
||||
stoken(boundary);
|
||||
ctoken("--\r\n");
|
||||
ctoken("--");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2886,9 +2886,9 @@ TEST_F(ServerTest, GetStreamedWithRangeMultipart) {
|
|||
cli_.Get("/streamed-with-range", {{make_range_header({{1, 2}, {4, 5}})}});
|
||||
ASSERT_TRUE(res);
|
||||
EXPECT_EQ(206, res->status);
|
||||
EXPECT_EQ("269", res->get_header_value("Content-Length"));
|
||||
EXPECT_EQ("267", res->get_header_value("Content-Length"));
|
||||
EXPECT_EQ(false, res->has_header("Content-Range"));
|
||||
EXPECT_EQ(269U, res->body.size());
|
||||
EXPECT_EQ(267U, res->body.size());
|
||||
}
|
||||
|
||||
TEST_F(ServerTest, GetStreamedEndless) {
|
||||
|
@ -2978,9 +2978,9 @@ TEST_F(ServerTest, GetWithRangeMultipart) {
|
|||
auto res = cli_.Get("/with-range", {{make_range_header({{1, 2}, {4, 5}})}});
|
||||
ASSERT_TRUE(res);
|
||||
EXPECT_EQ(206, res->status);
|
||||
EXPECT_EQ("269", res->get_header_value("Content-Length"));
|
||||
EXPECT_EQ("267", res->get_header_value("Content-Length"));
|
||||
EXPECT_EQ(false, res->has_header("Content-Range"));
|
||||
EXPECT_EQ(269U, res->body.size());
|
||||
EXPECT_EQ(267U, res->body.size());
|
||||
}
|
||||
|
||||
TEST_F(ServerTest, GetWithRangeMultipartOffsetGreaterThanContent) {
|
||||
|
|
Loading…
Reference in a new issue