This repository was archived by the owner on Nov 9, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
src/http/client/sslclients Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,17 @@ version = "0.1.0-pre"
4
4
authors = [
" Chris Morgan <[email protected] >" ]
5
5
build = " codegen/main.rs"
6
6
7
+ [features ]
8
+ default = [" ssl" ]
9
+ ssl = [" openssl" ]
10
+
7
11
[lib ]
8
12
name = " http"
9
13
path = " src/http/lib.rs"
10
14
11
15
[dependencies .openssl ]
12
16
git = " https://github.com/sfackler/rust-openssl.git"
17
+ optional = true
13
18
14
19
[dependencies .url ]
15
20
git = " https://github.com/servo/rust-url"
Original file line number Diff line number Diff line change 5
5
//! that, you won't be able to use SSL (an attempt to make an HTTPS connection
6
6
//! will return an error).
7
7
8
- #[ cfg( not ( nossl ) ) ]
8
+ #[ cfg( feature = "ssl" ) ]
9
9
pub use self :: openssl:: NetworkStream ;
10
- #[ cfg( nossl ) ]
10
+ #[ cfg( not ( feature = "ssl" ) ) ]
11
11
pub use self :: none:: NetworkStream ;
12
12
13
- #[ cfg( not ( nossl ) ) ]
13
+ #[ cfg( feature = "ssl" ) ]
14
14
mod openssl;
15
- #[ cfg( nossl ) ]
15
+ #[ cfg( not ( feature = "ssl" ) ) ]
16
16
mod none;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use std::io::net::ip::SocketAddr;
4
4
use std:: io:: net:: tcp:: TcpStream ;
5
5
use std:: io:: { IoResult , IoError , InvalidInput } ;
6
6
use connecter:: Connecter ;
7
+ use self :: NetworkStream :: NormalStream ;
7
8
8
9
/// A TCP stream, plain text and with no SSL support.
9
10
///
Original file line number Diff line number Diff line change 1
1
//! SSL support provided by OpenSSL.
2
2
3
+ #[ cfg( any( feature = "ssl" , feature = "default" ) ) ]
3
4
extern crate openssl;
4
5
5
6
use std:: io:: net:: ip:: SocketAddr ;
You can’t perform that action at this time.
0 commit comments