majek / puka

Puka - the opinionated RabbitMQ client
https://github.com/majek/puka
Other
182 stars 34 forks source link

remove utf-8 decoder on inbound message bodies #72

Closed jmptbl closed 4 years ago

jmptbl commented 4 years ago

Puka is assuming inbound message bodies are a utf-8 encoded byte stream. Although its common for message bodies to be utf-8 encoded byte streams, they are still just byte streams, and it is wrong to assume they are utf-8 encoded. This assumption prevents Puka from handling a message whose body is binary.

This patch removes that assumption. The application using Puka will need to handle the byte stream and decode it according to its use case.