Responding to a secure (HTTPS) request fails, after the server has been running for a few seconds. Responding to a HTTP request always works.
Responding to a request is handled as follows:
match response { Some(resp) => if let Err(e) = request.respond(resp) { error!("Error responding: {:?}", e); }, None => error!("Error creating response to request."), }
It seems request.respond(resp) somehow gets stuck, occasionally (very rarely) I get error messages about a "Broken Pipe".
The Response code looks as follows, with contents being a long string containing HTML stuff.
Response::from_data(contents.as_bytes()).with_header(Header::from_bytes(&b"Content-Type"[..], &b"text/html; charset=utf8"[..]).unwrap()).boxed()
Responding to a secure (HTTPS) request fails, after the server has been running for a few seconds. Responding to a HTTP request always works.
Responding to a request is handled as follows:
match response { Some(resp) => if let Err(e) = request.respond(resp) { error!("Error responding: {:?}", e); }, None => error!("Error creating response to request."), }It seems
request.respond(resp)somehow gets stuck, occasionally (very rarely) I get error messages about a "Broken Pipe".The Response code looks as follows, with
contentsbeing a long string containing HTML stuff.Response::from_data(contents.as_bytes()).with_header(Header::from_bytes(&b"Content-Type"[..], &b"text/html; charset=utf8"[..]).unwrap()).boxed()