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

binary.toByteString() only handles string values #431

Closed
grob opened this issue Jul 5, 2021 · 0 comments · Fixed by #432
Closed

binary.toByteString() only handles string values #431

grob opened this issue Jul 5, 2021 · 0 comments · Fixed by #432
Milestone

Comments

@grob
Copy link
Member

grob commented Jul 5, 2021

The current implementation of binary.toByteString() always converts the argument to a String (it was a String.prototype method before b085a7a - see #409). This is properly documented, but nevertheless the simple change from the prototype method toByteString() to binary.toByteString() broke stick's etag middleware in case of binary responses.

I'm wondering if we should change binary.toByteString() to add a check whether the first argument is an instance of Binary (and thus call Binary.prototype.toByteString()), because i sense there will be some more regressions coming up. Same with binary.toByteArray().

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

Successfully merging a pull request may close this issue.

2 participants