Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Buffers being passed back (even though journey is intended to be JSON only) #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dhendo
Copy link

@dhendo dhendo commented Dec 16, 2011

If a buffer is returned from a route, currently Journey will error on the line, as byteLength is expecting a string.

Buffer.byteLength(outcome.body);

Seeing as converting a Buffer to JSON is not a huge amount of use, my patch returns the buffer, and retains the Content-Type as is.

I know journey is supposed to be JSON-only, but the code change to support binary files is minimal and low impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants