We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b509b59 commit c3622c0Copy full SHA for c3622c0
extra/cockpit/foreman-cockpit-session
@@ -46,7 +46,7 @@ class AccessDeniedError < CockpitError; end
46
class Cockpit
47
class << self
48
def encode_message(payload)
49
- data = JSON.dump(payload)
+ data = JSON.dump(payload).bytes.pack("c*")
50
"#{data.length + 1}\n\n#{data}"
51
end
52
@@ -259,7 +259,8 @@ class Relay
259
Host: #{url.host}:#{url.port}
260
Connection: upgrade
261
Upgrade: raw
262
- Content-Length: #{data.length + 2}
+ Content-Length: #{data.bytes.length + 2}
263
+ Content-Type: application/json
264
265
#{data}
266
HTTP
0 commit comments