|
@@ -69,7 +69,8 @@ func (g *gzipWriter) WriteHeader(code int) {
|
|
|
|
|
|
|
|
func shouldCompress(req *http.Request) bool {
|
|
func shouldCompress(req *http.Request) bool {
|
|
|
if !strings.Contains(req.Header.Get("Accept-Encoding"), "gzip") ||
|
|
if !strings.Contains(req.Header.Get("Accept-Encoding"), "gzip") ||
|
|
|
- strings.Contains(req.Header.Get("Connection"), "Upgrade") {
|
|
|
|
|
|
|
+ strings.Contains(req.Header.Get("Connection"), "Upgrade") ||
|
|
|
|
|
+ strings.Contains(req.Header.Get("Content-Type"), "text/event-stream") {
|
|
|
|
|
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|