2
我試圖使用SSE從服務器尾部日誌,捲曲正常工作與SSE,但管道輸送時,捲曲不會輸出任何東西捲曲服務器發送的事件沒有輸出時,管
# This is ok
curl localhost:8080/logging/tail
輸出
data:2017-06-14 11:57:21.345 WARN 56999 --- [nio-8080-exec-4] a.b.c : ABC
data:2017-06-14 11:57:21.353 INFO 56999 --- [nio-8080-exec-4] a.b.c : DEF
隨着管
# Nothing show up, with -s or not
# Without -s, the process show's curl do receive data
curl -s localhost:8080/logging/tail | sed '/^\s*$/d'
curl -s localhost:8080/logging/tail | cat
如何使管捲曲上證所工作的? 我想刪除data:
前綴和sse輸出的空行。
$ curl --version
curl 7.51.0 (x86_64-apple-darwin16.0) libcurl/7.51.0 SecureTransport zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets
服務器是彈簧SseEmitter。