We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02e6563 commit b29d2f6Copy full SHA for b29d2f6
libs/server-sent-events/src/client.cpp
@@ -623,7 +623,6 @@ std::shared_ptr<Client> Builder::build() {
623
}
624
625
auto request = request_;
626
- request.body() = "";
627
628
if (request.method() == http::verb::post ||
629
request.method() == http::verb::report) {
@@ -633,6 +632,9 @@ std::shared_ptr<Client> Builder::build() {
633
632
content_header == request.end()) {
634
request.set(http::field::content_type, "text/plain");
635
+ } else {
636
+ // If this is *not* a post or report, then make sure no body is sent.
637
+ request.body() = "";
638
639
640
request.prepare_payload();
0 commit comments