Skip to content

net/ghttp: stream content might be splitted #3584

Open
@lcm1475

Description

@lcm1475

Go version

go version go1.21.5 darwin/arm64

GoFrame version

v2.6.1

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

gf的流式输出在移动端会断开把一次的数据截断成2次发送,同样的代码放到gin就没问题
而且这个情况web看不出来,打印输出到web页面上是没问题的,移动端才能复现这个问题,Android,ios,Flutter,这些移动端必现,但是Android,ios,Flutter这些接入官方的openai,bing,文心,或者gin都是正常的,只有gf会断开,
把数据缩短好像断开的情况就很少了,但是实际业务中没办法缩短数据,一串json不可能分开发送
a3346610e45fc4df8ccc102090602e40
05a6970542c3396007cac39c59bfb9c5

What did you see happen?

数据会有断开的情况

What did you expect to see?

希望不要断开

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt is confirmed a bug, but don't worry, we'll handle it.need more details

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions