minor bug fixes

This commit is contained in:
ading2210 2025-01-10 11:45:52 -05:00
parent 718d22a97d
commit 885e83d2eb
5 changed files with 17 additions and 2 deletions

View file

@ -50,6 +50,8 @@ class CurlWebSocket extends CurlSession {
headers: this.options.headers || {}
};
if (this.protocols) {
if (typeof this.protocols === "string")
this.protocols = [this.protocols];
request_options.headers["Sec-Websocket-Protocol"] = this.protocols.join(", ");
}
if (this.options.verbose) {