Response sent in chunked transfer encoding and indicating errors happening after some data has already been sent

后端 未结 2 1540
傲寒
傲寒 2020-12-07 01:31

I am sending large amount of data in my response to the client in chunked transfer encoding format.

How should I be dealing with any errors that occur midwa

2条回答
  •  甜味超标
    2020-12-07 02:11

    Chunked responses can use trailer header with some integrity check or post-processing status. This may be better than closing the connection as described in accepted answer because you can have custom error message. However, you only benefit from that if you have control of both server and client.

提交回复
热议问题