ehttp icon indicating copy to clipboard operation
ehttp copied to clipboard

Streaming chunks fragmented at 2048 bytes

Open RJ opened this issue 1 year ago • 1 comments

I'm using streaming, and if i send a chunk larger than 2048, it's truncated. I get sent a Part which is 2048 long, even if the server sent a larger chunk. (which then doesn't deserialize properly as it's truncated)

due to hardcoded buffer size here: https://github.com/emilk/ehttp/blob/master/ehttp/src/streaming/native.rs#L57

i don't think it's possible to know if a received Part was truncated or was simply exactly 2048 long originally.

RJ avatar Oct 17 '24 21:10 RJ

not a real fix, but i doubled the size to "fix" my problem, and added a warning

https://github.com/rj/ehttp/blob/chunkier/ehttp/src/streaming/native.rs#L57

RJ avatar Oct 17 '24 22:10 RJ