HTTPサーバーが複数のパケットを介してデータを送信する正しい方法は何ですか?
たとえば、ファイルを転送したい場合、最初に送信するパケットは次のとおりです。
HTTP/1.1 200 OK
Content-type: application/force-download
Content-Type: application/download
Content-Type: application/octet-stream
Content-Description: File Transfer
Content-disposition: attachment; filename=test.dat
Content-Transfer-Encoding: chunked
400
<first 1024 bytes here>
400
<next 1024 bytes here>
400
<next 1024 bytes here>
送信するだけの場合は、新しいパケットを作成する必要があります。
400
<next 1024 bytes here>
すべてのクライアントが私の接続を閉じ、ファイルが短くなります。
データストリームを続行するために、2番目のパケットにどのヘッダーを入れますか?