TUN-3557: Detect SSE if content-type starts with text/event-stream

This commit is contained in:
cthuang
2020-11-18 11:53:59 +00:00
committed by Chung Ting Huang
parent 293b9af4a7
commit fdb1f961b3
5 changed files with 49 additions and 18 deletions

View File

@@ -167,7 +167,7 @@ func (rp *http2RespWriter) WriteRespHeaders(resp *http.Response) error {
status = http.StatusOK
}
rp.w.WriteHeader(status)
if isServerSentEvent(resp.Header) {
if IsServerSentEvent(resp.Header) {
rp.shouldFlush = true
}
if rp.shouldFlush {