Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Request SSL Stream #633

Closed
andrewgross opened this issue Aug 21, 2015 · 1 comment
Closed

Server Request SSL Stream #633

andrewgross opened this issue Aug 21, 2015 · 1 comment
Labels
A-docs Area: documentation. C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@andrewgross
Copy link

Having some issues getting access to the SSL Stream for an HTTPS request. I am using the example code, though it still seems to be unhappy.

On Rust 1.2, hyper = "0.6.9"

fn doc_ssl(req: hyper::server::Request) {
    let maybe_ssl = req.ssl::<SslStream>();
}

src/main.rs:105:31: 105:40 error: wrong number of type arguments: expected 1, found 0 [E0243]
src/main.rs:105     let maybe_ssl = req.ssl::<SslStream>();
                                              ^~~~~~~~~

It seems no matter how many type annotations I give, and how I try to match that it refuses to accept it. Due to recent addition of this feature, I am not sure if is a bug, or if I am just unable to implement it correctly. Apologies if this is a trivial issue, I am still quite new to rust.

@seanmonstar
Copy link
Member

The SslStream from openssl has a type parameter. Try SslStream.

On Fri, Aug 21, 2015, 11:12 AM Andrew Gross [email protected]
wrote:

Having some issues getting access to the SSL Stream for an HTTPS request.
I am using the example code, though it still seems to be unhappy.

On Rust 1.2, hyper = "0.6.9"

fn doc_ssl(req: hyper::server::Request) {
let maybe_ssl = req.ssl::();
}

src/main.rs:105:31: 105:40 error: wrong number of type arguments: expected 1, found 0 [E0243]
src/main.rs:105 let maybe_ssl = req.ssl::();
^~~~~~~~~

It seems no matter how many type annotations I give, and how I try to
match that it refuses to accept it. Due to recent addition of this
feature, I am not sure if is a bug, or if I am just unable to implement it
correctly. Apologies if this is a trivial issue, I am still quite new to
rust.


Reply to this email directly or view it on GitHub
#633.

@seanmonstar seanmonstar added C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: easy. A task that would be a great starting point for a new contributor. A-docs Area: documentation. labels Aug 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation. C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
Development

No branches or pull requests

2 participants