File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 764
764
(some #{:http2 } http-versions))
765
765
(throw (IllegalArgumentException. " HTTP/2 requires ssl-context to be given or use-h2c? to be true." )))
766
766
767
+ (when (and ssl-context
768
+ use-h2c?)
769
+ (throw (IllegalArgumentException. " use-h2c? must not be true when ssl-context is given." )))
770
+
767
771
(netty/start-server
768
772
{:pipeline-builder pipeline-builder
769
773
:bootstrap-transform bootstrap-transform
Original file line number Diff line number Diff line change 1410
1410
{:use-h2c? true
1411
1411
:http-versions [:http2 ]})]
1412
1412
(is (= :started result))))
1413
- (testing " HTTP/2 with ssl-context *and* with h2c (which has no effect then) "
1413
+ (testing " HTTP/2 with ssl-context *and* with h2c"
1414
1414
(let [result (try-start-server
1415
1415
{:use-h2c? true
1416
1416
:http-versions [:http2 ]
1417
1417
:ssl-context test-ssl/server-ssl-context-opts})]
1418
- (is (= :started result)))))
1418
+ (is (instance? IllegalArgumentException result))
1419
+ (is (= " use-h2c? must not be true when ssl-context is given." (ex-message result))))))
You can’t perform that action at this time.
0 commit comments