Skip to content

Commit 26b3a91

Browse files
committed
Fixed bug in hello world async server example.
1 parent fdff8f4 commit 26b3a91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libs/network/example/http/hello_world_async_server_with_work_queue.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ void process_request(work_queue& queue) {
125125
// some heavy work!
126126
std::this_thread::sleep_for(std::chrono::seconds(10));
127127

128+
std::map<std::string, std::string> headers = {
129+
{"Content-Type", "text/plain"},
130+
};
131+
128132
request->conn->set_status(server::connection::ok);
133+
request->conn->set_header(headers);
129134
request->conn->write("Hello, world!");
130135
}
131136

0 commit comments

Comments
 (0)