This repository was archived by the owner on Dec 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ AEGIS_DECL rest_reply rest_controller::execute(rest::request_params && params)
115115 request_stream << " Content-Length: " << ss.str ().length () << " \r\n\r\n " ;
116116 request_stream << ss.str ();
117117 }
118- else if (!params.body .empty ())
118+ else if (!params.body .empty () || params. method == Post || params. method == Put || params. method == Patch )
119119 {
120120 request_stream << " Content-Length: " << params.body .size () << " \r\n " ;
121121 request_stream << " Connection: close\r\n " ;
@@ -232,7 +232,7 @@ AEGIS_DECL rest_reply rest_controller::execute2(rest::request_params && params)
232232 for (auto & h : params.headers )
233233 request_stream << h << " \r\n " ;
234234
235- if (!params.body .empty ())
235+ if (!params.body .empty () || params. method == Post || params. method == Put || params. method == Patch )
236236 {
237237 request_stream << " Connection: close\r\n " ;
238238 request_stream << " Content-Length: " << params.body .size () << " \r\n " ;
@@ -275,7 +275,7 @@ AEGIS_DECL rest_reply rest_controller::execute2(rest::request_params && params)
275275 for (auto & h : params.headers )
276276 request_stream << h << " \r\n " ;
277277
278- if (!params.body .empty ())
278+ if (!params.body .empty () || params. method == Post || params. method == Put || params. method == Patch )
279279 {
280280 request_stream << " Connection: close\r\n " ;
281281 request_stream << " Content-Length: " << params.body .size () << " \r\n " ;
You can’t perform that action at this time.
0 commit comments