aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/websocket_http_client.zig15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/http/websocket_http_client.zig b/src/http/websocket_http_client.zig
index 5dd81f6db..52d64b8a2 100644
--- a/src/http/websocket_http_client.zig
+++ b/src/http/websocket_http_client.zig
@@ -857,11 +857,14 @@ pub fn NewWebSocketClient(comptime ssl: bool) type {
}
fn clearReceiveBuffers(this: *WebSocket, free: bool) void {
- this.receive_buffer.discard(this.receive_buffer.count);
+ this.receive_buffer.head = 0;
+ this.receive_buffer.count = 0;
+
if (free) {
this.receive_buffer.deinit();
this.receive_buffer.buf.len = 0;
}
+
this.receive_pending_chunk_len = 0;
this.receive_body_remain = 0;
}
@@ -891,7 +894,7 @@ pub fn NewWebSocketClient(comptime ssl: bool) type {
var outstring = JSC.ZigString.Empty;
if (utf16_bytes_) |utf16| {
outstring = JSC.ZigString.from16Slice(utf16);
- outstring.markUTF16();
+ outstring.mark();
JSC.markBinding();
WebSocket__didReceiveText(out, false, &outstring);
} else {
@@ -1118,7 +1121,13 @@ pub fn NewWebSocketClient(comptime ssl: bool) type {
.close => {
// closing frame data is text only.
- _ = this.consume(data[0..receive_body_remain], receive_body_remain, .Text, true);
+
+ // 2 byte close code
+ if (data.len > 2) {
+ _ = this.consume(data[2..receive_body_remain], receive_body_remain - 2, .Text, true);
+ data = data[receive_body_remain..];
+ }
+
this.sendClose();
terminated = true;
break;
onent-api-2 Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/packages/renderers/renderer-vue/server.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-04-10attempt to fix the 'no commits' bug in changesetGravatar Fred K. Schott 1-1/+1
2022-04-10revert releaseGravatar Fred K. Schott 76-225/+329
2022-04-10Update astro changelogGravatar Fred K. Schott 1-29/+0
2022-04-11[ci] formatGravatar FredKSchott 3-34/+34
2022-04-10[ci] release (#3060)Gravatar github-actions[bot] 76-363/+288
2022-04-10update changesetGravatar Fred K. Schott 1-1/+0
2022-04-10update changesetGravatar Fred K. Schott 1-1/+1
2022-04-10update lockfile (#3059)Gravatar Fred K. Schott 29-914/+698
2022-04-10correct changesetsGravatar Fred K. Schott 3-3/+11
2022-04-10chore: webapi test now use chai (#3048)Gravatar Juan Martín Seery 16-814/+539
2022-04-10update test names containing spacesGravatar Fred K. Schott 26-17/+17
2022-04-11[ci] formatGravatar FredKSchott 2-8/+7
2022-04-10Fix SSR static build public file copying. fixes #3016 (#3037)Gravatar Steve Lee 8-5/+48
2022-04-10fix our weird beta release issues (#3031)Gravatar Fred K. Schott 4-6/+116
2022-04-10update tailwind integration readmeGravatar Fred K. Schott 2-9/+38
2022-04-10Fixed MD Lint issues (#3038)Gravatar Rafid Muhymin Wafi 1-12/+11