File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ bytesize = "1.0"
2424crates-io = { path = " src/crates-io" , version = " 0.25" }
2525crossbeam-utils = " 0.6"
2626crypto-hash = " 0.3.1"
27- curl = { version = " 0.4.19 " , features = [' http2' ] }
28- curl-sys = " 0.4.15 "
27+ curl = { version = " 0.4.21 " , features = [' http2' ] }
28+ curl-sys = " 0.4.18 "
2929env_logger = " 0.6.0"
3030pretty_env_logger = { version = " 0.3" , optional = true }
3131failure = " 0.1.5"
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ fn maybe_spurious(err: &Error) -> bool {
5050 || curl_err. is_couldnt_resolve_host ( )
5151 || curl_err. is_operation_timedout ( )
5252 || curl_err. is_recv_error ( )
53+ || curl_err. is_http2_stream_error ( )
5354 {
5455 return true ;
5556 }
@@ -125,3 +126,10 @@ fn with_retry_finds_nested_spurious_errors() {
125126 let result = with_retry ( & config, || results. pop ( ) . unwrap ( ) ) ;
126127 assert_eq ! ( result. unwrap( ) , ( ) )
127128}
129+
130+ #[ test]
131+ fn curle_http2_stream_is_spurious ( ) {
132+ let code = curl_sys:: CURLE_HTTP2_STREAM ;
133+ let err = curl:: Error :: new ( code) ;
134+ assert ! ( maybe_spurious( & err. into( ) ) ) ;
135+ }
You can’t perform that action at this time.
0 commit comments