mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-30 02:47:56 +08:00
websocket key for server side
This commit is contained in:
parent
7bcb88ae3c
commit
03896a6a12
@ -356,7 +356,6 @@ public:
|
||||
}
|
||||
|
||||
http_header& set_ws_accept(const char* key);
|
||||
http_header& set_ws_accept(const void* key, size_t len);
|
||||
const char* get_ws_accept(void) const
|
||||
{
|
||||
return ws_sec_accept_;
|
||||
|
@ -821,18 +821,7 @@ http_header& http_header::set_ws_version(int ver)
|
||||
http_header& http_header::set_ws_accept(const char* key)
|
||||
{
|
||||
if (key && *key) {
|
||||
return set_ws_accept(key, strlen(key));
|
||||
} else {
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
http_header& http_header::set_ws_accept(const void* key, size_t len)
|
||||
{
|
||||
if (key) {
|
||||
string buf;
|
||||
buf.base64_encode(key, len);
|
||||
ws_sec_key_ = dbuf_->dbuf_strdup(buf.c_str());
|
||||
ws_sec_key_ = dbuf_->dbuf_strdup(key);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user