arobson / rabbot

Deprecated: Please see https://github.com/Foo-Foo-MQ/foo-foo-mq
MIT License
276 stars 129 forks source link

changed contentEncoding for messages to be standard compliant #137

Closed schubter closed 4 years ago

schubter commented 6 years ago

as per http://www.iana.org/assignments/character-sets/character-sets.xhtml utf8 does not exist.

when publishing messages as JSON-RPC a proper implemented server rejects the message as invalid due the invalid content encoding

const hrTime = process.hrtime();
rabbot.publish( "service.rpc", {
    type: "ping",
    contentType: "application/json",
    body: { ping: hrTime[0] * 1000 + hrTime[1] / 1000000 },
    headers: {
      jsonrpc: "2.0",
    },
}
coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 88.977% when pulling 1d0b23d459aedcf33fb530c20b771eb54f4c9be8 on schubter:content-encoding into 80b63c08bdb32d04fd36502f24180e0c8e8f69ee on arobson:master.