Home > Net >  In c #, StreamReader. ReadToEnd data truncation phenomenon in a (), read data leakage
In c #, StreamReader. ReadToEnd data truncation phenomenon in a (), read data leakage

Time:09-20

The diagram below, this is a interface returns json, size is fixed, 7266 bytes, the Response of the contentLength is 7266, that receive is normal, but sometimes can appear truncated phenomenon, may be the reason why

CodePudding user response:

Byte is too long, once read all finished reading not

CodePudding user response:

reference 1st floor Bridge_go response:
byte is too long, a read all finished not

7266 bytes, not long

CodePudding user response:

Try not to know

CodePudding user response:

A byte is 0

CodePudding user response:

reference 4 floor wangmoxhn response:
a byte 0

You mean the byte [0]? When read if meet the middle there is a byte is 0, the program will judge for this flow has been finished???????

CodePudding user response:

refer to fifth floor keep home paste mouth reply:
Quote: refer to 4th floor wangmoxhn response:

A byte 0

You mean the byte [0]? When read if meet the middle there is a byte is 0, the program will judge for this flow has been finished???????

You write a loop, decide not to know
  •  Tags:  
  • C#