Skip to content

Commit 0d8c9ed

Browse files
committed
Prioritize HTTP/2 in client connections
1 parent 2e8280a commit 0d8c9ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/aleph/http.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
| `proxy-options` | a map to specify proxy settings. HTTP, SOCKS4 and SOCKS5 proxies are supported. Note, that when using proxy `connections-per-host` configuration is still applied to the target host disregarding tunneling settings. If you need to limit number of connections to the proxy itself use `total-connections` setting.
137137
| `response-executor` | optional `java.util.concurrent.Executor` that will execute response callbacks
138138
| `log-activity` | when set, logs all events on each channel (connection) with a log level given. Accepts one of `:trace`, `:debug`, `:info`, `:warn`, `:error` or an instance of `io.netty.handler.logging.LogLevel`. Note, that this setting *does not* enforce any changes to the logging configuration (default configuration is `INFO`, so you won't see any `DEBUG` or `TRACE` level messages, unless configured explicitly)
139-
| `http-versions` | an optional vector of preferred HTTP versions to negotiate via ALPN, in order. Defaults to `[:http2 :http1]`.
139+
| `http-versions` | an optional vector of allowable HTTP versions to negotiate via ALPN, in preference order. Defaults to `[:http2 :http1]`.
140140
| `force-h2c?` | an optional boolean indicating you wish to force the use of insecure HTTP/2 cleartext (h2c) for `http://` URLs. Not recommended, and unsupported by most servers in the wild. Only do this with infrastructure you control. Defaults to `false`.
141141
142142
Supported `proxy-options` are

src/aleph/http/client.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@
970970
epoll? false
971971
name-resolver :default
972972
log-activity :debug
973-
http-versions [:http1 :http2]
973+
http-versions [:http2 :http1]
974974
force-h2c? false}
975975
:as opts}]
976976

0 commit comments

Comments
 (0)