File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
contract-tests/sse-contract-tests/src
libs/server-sent-events/src Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ EventOutbox::RequestType EventOutbox::build_request(
67
67
RequestType req;
68
68
69
69
req.set (http::field::host, callback_host_);
70
- req.method (http::verb::get );
70
+ req.method (http::verb::post );
71
71
req.target (callback_url_ + " /" + std::to_string (counter));
72
72
73
73
nlohmann::json json;
Original file line number Diff line number Diff line change @@ -303,6 +303,12 @@ class FoxyClient : public Client,
303
303
logger_ (" read HTTP response body aborted (shutting down)" );
304
304
return ;
305
305
}
306
+ if (body_parser_->is_done ()) {
307
+ // The server can indicate that the chunk encoded response is done
308
+ // by sending a final chunk + CRLF. The body parser will have
309
+ // detected this. The correct response is to attempt to reconnect.
310
+ return do_backoff (" receiving final chunk" );
311
+ }
306
312
if (!ec) {
307
313
log_and_update_last_read (amount);
308
314
return session_->async_read_some (
You can’t perform that action at this time.
0 commit comments