Skip to content

Commit

Permalink
fix(ServiceBusPolicy): Avoid jsonifying Buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
noodlefrenzy authored and mbroadst committed Jan 8, 2017
1 parent 6fb675c commit 0814658
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/policies/service_bus_policy.js
Expand Up @@ -10,6 +10,7 @@ module.exports = new Policy({
maxMessageSize: 10000, // Arbitrary choice
},
encoder: function(body) {
if (body instanceof Buffer) return body;
var bodyStr = body;
if (typeof body !== 'string') {
bodyStr = JSON.stringify(body);
Expand Down

0 comments on commit 0814658

Please sign in to comment.