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

fix a problem about Multi-Byte character #1042

Merged
merged 4 commits into from Feb 8, 2019
Merged

Conversation

rhjyy
Copy link
Contributor

@rhjyy rhjyy commented Feb 5, 2019

If the data contains Multi-Byte character,it may be cut by the tcp packets,then the join function's result will contain some unintelligible text,because it turns the object in the array into string before the concat action.So,we should replace it with the Buffer class's member function concat.

If the data contains Multi-Byte character,it may be cut by the tcp packets,then the join function's result will contain some unintelligible text,because it turns the object in the array into string before the concat action.So,we should replace it with the Buffer class's member function concat.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.296% when pulling 03af7b5 on rhjyy:master into 2bed4c7 on vpulim:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.296% when pulling 03af7b5 on rhjyy:master into 2bed4c7 on vpulim:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.296% when pulling 03af7b5 on rhjyy:master into 2bed4c7 on vpulim:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.296% when pulling 03af7b5 on rhjyy:master into 2bed4c7 on vpulim:master.

@coveralls
Copy link

coveralls commented Feb 5, 2019

Coverage Status

Coverage remained the same at 93.296% when pulling 03fbd21 on rhjyy:master into 2bed4c7 on vpulim:master.

@jsdevel
Copy link
Collaborator

jsdevel commented Feb 5, 2019

@rhjyy please add a test

The fix of this problem is in the commit 03af7b5.If the data contains Multi-Byte character,it may be cut by the tcp packets,then the join function's result will contain some unintelligible text,because it turns the object in the array into string before the concat action.
@rhjyy
Copy link
Contributor Author

rhjyy commented Feb 7, 2019

@jsdevel the test has been added.

}
};

server.listen(51515);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move the server declaration/initialization to a before block, then in an after block tear it down?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.pls check if it is right.

move initialization and finalization into before and after block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants