File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,14 +83,14 @@ class HttpRequest final
8383
8484 void setBody (const std::string& body)
8585 {
86- mBody = body;
8786 addHeadValue (" Content-Length" , std::to_string (body.size ()));
87+ mBody = body;
8888 }
8989
9090 void setBody (std::string&& body)
9191 {
92- mBody = std::move (body);
9392 addHeadValue (" Content-Length" , std::to_string (body.size ()));
93+ mBody = std::move (body);
9494 }
9595
9696 void addHeadValue (const std::string& field,
@@ -180,14 +180,14 @@ class HttpResponse final
180180
181181 void setBody (const std::string& body)
182182 {
183- mBody = body;
184183 addHeadValue (" Content-Length" , std::to_string (body.size ()));
184+ mBody = body;
185185 }
186186
187187 void setBody (std::string&& body)
188188 {
189- mBody = std::move (body);
190189 addHeadValue (" Content-Length" , std::to_string (body.size ()));
190+ mBody = std::move (body);
191191 }
192192
193193 std::string getResult () const
You can’t perform that action at this time.
0 commit comments