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

Already on GitHub? Sign in to your account

UTF8 fixes and ns.Stream emitter #1

Closed
wants to merge 7 commits into
from

Conversation

Projects
None yet
2 participants

josh commented Sep 28, 2010

  1. Added more edge case test coverage
  2. Fixed utf8 length in nsPayload where a string in passed in. I think we always want to convert string inputs into buffers so we can compute the real byte length.
  3. Added a a Stream class that can wrap another a readable stream but will emit payloads as data instead of broken chunks.

It'd be great if you would publish netstring to npm.

Thanks, Josh.

josh added some commits Sep 28, 2010

@josh josh Test payload length with leading colon ccd71a0
@josh josh Test empty payload is incomplete 175ff13
@josh josh Test empty payload 6f3ea97
@josh josh Fix writing empty netstring 809f01c
@josh josh Fix utf8 lengths
Length should always be the number of bytes in the string,
not always String.length.

If a string is passed to nsPayload, convert it to a Buffer
so we can compute the number of bytes in the string.
9c2c06d
@josh josh Add Stream e877a93
@josh josh Add npm package e9b9c7c
Owner

pgriess commented Oct 13, 2010

Pulled into master.

This issue was closed.

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