浏览代码

Merge branch 'master' into version/4

DarthSim 1 月之前
父节点
当前提交
84824a544e
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. 3 0
      CHANGELOG.md
  2. 6 0
      transport/generichttp/generic_http.go

+ 3 - 0
CHANGELOG.md

@@ -1,6 +1,9 @@
 # Changelog
 # Changelog
 
 
 ## [Unreleased]
 ## [Unreleased]
+### Added
+- (pro) Add [color_profile](https://docs.imgproxy.net/latest/usage/processing#color-profile) processing option and [IMGPROXY_COLOR_PROFILES_DIR](https://docs.imgproxy.net/latest/configuration/options#IMGPROXY_COLOR_PROFILES_DIR) config
+
 ### Changed
 ### Changed
 - (pro) Improve video decoding performance.
 - (pro) Improve video decoding performance.
 - (pro) Respond with `422 Unprocessable Entity` on error during video decoding.
 - (pro) Respond with `422 Unprocessable Entity` on error during video decoding.

+ 6 - 0
transport/generichttp/generic_http.go

@@ -36,6 +36,10 @@ func New(verifyNetworks bool) (*http.Transport, error) {
 		ExpectContinueTimeout: 1 * time.Second,
 		ExpectContinueTimeout: 1 * time.Second,
 		ForceAttemptHTTP2:     false,
 		ForceAttemptHTTP2:     false,
 		DisableCompression:    true,
 		DisableCompression:    true,
+
+		HTTP2: &http.HTTP2Config{
+			MaxReceiveBufferPerStream: 128 * 1024,
+		},
 	}
 	}
 
 
 	if config.ClientKeepAliveTimeout <= 0 {
 	if config.ClientKeepAliveTimeout <= 0 {
@@ -52,6 +56,8 @@ func New(verifyNetworks bool) (*http.Transport, error) {
 		return nil, err
 		return nil, err
 	}
 	}
 
 
+	// TODO: Move this to transport.HTTP2 when https://go.dev/issue/67813 is closed
+	transport2.MaxReadFrameSize = 16 * 1024
 	transport2.PingTimeout = 5 * time.Second
 	transport2.PingTimeout = 5 * time.Second
 	transport2.ReadIdleTimeout = time.Second
 	transport2.ReadIdleTimeout = time.Second