Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit26b3a91

Browse files
committed
Fixed bug in hello world async server example.
1 parentfdff8f4 commit26b3a91

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)

[8]ページ先頭

©2009-2025 Movatter.jp