サンプルWebアプリケーションplay-streaming-scalaを実行しようとしていますが、状況によっては奇妙な動作が発生します。Play with Server-Sent Events:プロセスが終了したときに応答が返される
私はいくつかのホストのポート80で直接実行しているアプリケーションを持っていると私はcurl -iv --raw http://somehost/scala/eventSource/liveClock
と出力をチェックしている。私は期待してい何
は次のようなものです:
* Hostname was NOT found in DNS cache
* Trying 195.176.3.71...
* Connected to somehost (0.0.0.0) port 80 (#0)
> GET /scala/eventSource/liveClock HTTP/1.1
> User-Agent: curl/7.39.0
> Host: somehost
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Content-Type: text/event-stream; charset=utf-8
Content-Type: text/event-stream; charset=utf-8
< Date: Wed, 18 Jan 2017 13:24:55 GMT
Date: Wed, 18 Jan 2017 13:24:55 GMT
<
10
data: 14 24 56
10
data: 14 24 56
10
data: 14 24 56
など、明確に時間が経つにつれて塊が次々に表示されます参照してください。
ここでは、一部のマシンでは正常に動作します。キャンパス内の他のいくつかでは、これは失敗します。 curl
はこれだけを示し、その後、停止します。
* Trying 195.176.3.71...
* Connected to somehost (0.0.0.0) port 80 (#0)
> GET /scala/eventSource/liveClock HTTP/1.1
> Host: somehost
> User-Agent: curl/7.43.0
> Accept: */*
>
今興味深いものです:私はホスト上のWebアプリケーションを殺す場合、curl
はこのような接続を閉じ、突然「追いつく」と一緒にすべてのチャンクを吐く:
10
data: 14 35 20
* transfer closed with outstanding read data remaining
* Closing connection 0
curl: (18) transfer closed with outstanding read data remaining
何が原因なのですか?地球上で何が起こっていて、これらの出来事を傍受しているのですか? Playレスポンスから何か「強制的に強制」できる方法はありますか?