Skip to content

Commit dfe4d62

Browse files
committed
Content-Length should be counted by bytesize
1 parent 55ef29f commit dfe4d62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/debug/server_dap.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def send **kw
8787
kw[:seq] = @seq += 1
8888
str = JSON.dump(kw)
8989
show_protocol '<', str
90-
@sock.write "Content-Length: #{str.size}\r\n\r\n#{str}"
90+
@sock.write "Content-Length: #{str.bytesize}\r\n\r\n#{str}"
9191
end
9292

9393
def send_response req, success: true, **kw

0 commit comments

Comments
 (0)