Unity最佳HTTP/2规范与形式



我希望解决当前版本的Best HTTP/2的问题,当我发送请求(POST(并附上一个Form并将表单类型选择为Multipart时,会出现一条错误消息,说:RST流帧错误:PROTOCOL_error(1(我不知道原因是否是该网站支持HTTP/3请求。但它应该自动处理版本中较低的请求。此外,在HTTP/1.1中使用UnityRequest对我有效,我不知道到底出了什么问题。

这是完整的信息:

{"tid":83,"div":"HTTP2Stream","msg":"[3] RST Stream frame ([HTTP2RST_StreamFrame Header: [HTTP2FrameHeaderAndPayload Length: 4, Type: RST_STREAM, Flags: 00000000, StreamId: 3, PayloadOffset: 0, DontUseMemPool: False], Error: PROTOCOL_ERROR(1)]) received in state HalfClosedLocal!","stack":"  at Connections.HTTP2.HTTP2Stream.ProcessIncomingFrames (System.Collections.Generic.List`1[T] outgoingFrames)  in A:\..\..\..\UnityProject\backend\Assets\Best HTTP\Source\Connections\HTTP2\HTTP2Stream.cs:392 r  at Connections.HTTP2.HTTP2Stream.AddFrame (Connections.HTTP2.HTTP2FrameHeaderAndPayload frame, System.Collections.Generic.List`1[T] outgoingFrames)  in A:\..\..\..\UnityProject\backend\Assets\Best HTTP\Source\Connections\HTTP2\HTTP2Stream.cs:194 r  at Connections.HTTP2.HTTP2Handler.RunHandler ()  in A:\..\..\..\UnityProject\backend\Assets\Best HTTP\Source\Connections\HTTP2\HTTP2Handler.cs:185 r  at Connections.HTTPConnection.ThreadFunc ()  in A:\..\..\..\UnityProject\backend\Assets\Best HTTP\Source\Connections\HTTPConnection.cs:122 r  at PlatformSupport.Threading.ThreadedRunner+<>c__DisplayClass5_0.<RunLongLiving>b__0 (System.Object param) [0x00000] in A:\..\..\..\UnityProject\backend\Assets\Best HTTP\Source\PlatformSupport\Threading\ThreadedRunner.cs:98 r  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 r  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 r  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 r  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 r  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 ","ctxs":[{"TypeName": "HTTP2Stream", "Hash": -1208815744, "id": 3},{"TypeName": "HTTPRequest", "Hash": 350817792},{"TypeName": "HTTP2Handler", "Hash": 964403712, "Connection": 738886912}],"t":637835483138909554,"ll":"Error","bh":1}

谢谢你,我现在已经发现了错误的原因,我试图用相同的HTTPRequest对象执行请求,它在没有Forms数据的正常请求(GET、POST(中工作,通过更新请求信息,因为我想保持与Host信息的连接,并使连接无缝,在更新表单和提交请求时,更新标头似乎有问题。出现错误时,我尝试创建一个新的HTTPRequest对象,并在每次请求更新中删除旧的HTTPRequest,它似乎工作正常,我认为它会从一开始重新连接,大约需要1000毫秒才能响应,但漂亮的通信似乎是连续的

最新更新