-
Notifications
You must be signed in to change notification settings - Fork 81
IfPipe can lose the input message #9105
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
Conversation
return MediaType.APPLICATION_JSON; | ||
try { | ||
InputStream inputStream = message.asInputStream(); | ||
inputStream.mark(20_000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik weet niet of de jsonParser meer wilt inlezen en dit nu goed gaat omdat onze test input niet groter is dan 20_000L
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dat risico is er. 20K leek me een redelijke buffer.
Ik kan dit hele stuk er ook uithalen en maar aannemen dat het JSON zal zijn als het begint met {
of [
, daar heb ik over getwijfeld.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS: De parser is een streaming parser. Hij zal niet meteen de hele JSON inlezen, behalve misschien in bepaalde edge-cases.
Daarom verwacht ik niet direct een probleem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik heb 2 tests toegevoegd voor grote JSON berichten. Lijkt te werken, in ieder geval met deze berichten.
|
Closes #9012: IfPipe is supposed to pass on the input unmodified but when the input is a stream, there are various ways in which it can lose the input.