Skip to content

Commit

Permalink
fix ws (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Jan 16, 2024
1 parent 687f8b8 commit 4928c2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/cinatra/coro_http_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ class coro_http_connection

code_utils::base64_encode(accept_key, sha1buf, sizeof(sha1buf), 0);

response_.set_status(status_type::switching_protocols);
response_.set_status_and_content(status_type::switching_protocols);

response_.add_header("Upgrade", "WebSocket");
response_.add_header("Connection", "Upgrade");
Expand Down
1 change: 1 addition & 0 deletions include/cinatra/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <array>
#include <asio/buffer.hpp>
#include <cctype>
#include <charconv>
#include <cstddef> //std::byte
#include <cstdlib>
#include <iomanip>
Expand Down

0 comments on commit 4928c2c

Please sign in to comment.