FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Read Activity Data directly from InputStream by matthiasblaesing · Pull Request #137 · microsoft/botbuilder-java · GitHub

This repository was archived by the owner on Dec 4, 2023. It is now read-only.
/ botbuilder-java Public archive

Read Activity Data directly from InputStream - #137

Merged
tracyboehrer (tracyboehrer) merged 1 commit into
microsoft:masterfrom
matthiasblaesing:utf8-stream
Oct 28, 2019
Merged

Read Activity Data directly from InputStream#137
tracyboehrer (tracyboehrer) merged 1 commit into
microsoft:masterfrom
matthiasblaesing:utf8-stream

Conversation

Copy link
Copy Markdown
Contributor

The input from the bot is marked as content-type "appliation/json; charset=utf-8"
even if the charset would not be explicitly stated, RFC8259 requires the
encoding to be UTF-8.

The approach to read individual bytes from the inputstream and treat
each byte as a character (ControllerBase.java) or even as url encoded
data (app.java) are just invalid and work by plain luck. If only ascii
input is tested, it most probably mostly works, but fails for all inputs
with high bytes set.

Jackson can decode JSON directly from an inputstream and then does the
right thing, there is no need to manually read the stream.

The input from the bot is marked as content-type "appliation/json; charset=utf-8"
even if the charset would not be explicitly stated, RFC8259 requires the
encoding to be UTF-8.

The approach to read individual bytes from the inputstream and treat
each byte as a character (ControllerBase.java) or even as url encoded
data (app.java) are just invalid and work by plain luck. If only ascii
input is tested, it most probably mostly works, but fails for all inputs
with high bytes set.

Jackson can decode JSON directly from an inputstream and then does the
right thing, there is no need to manually read the stream.

Microsoft Contribution License Agreements (msftclas) commented Oct 27, 2019
edited
Loading

Copy link
Copy Markdown


All CLA requirements met.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

tracyboehrer (tracyboehrer) merged commit ad8eb63 into microsoft:master Oct 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL