1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-30 18:34:36 +01:00

use right path

This commit is contained in:
Nikolay Kim 2018-01-27 22:52:17 -08:00
parent 826fc62299
commit 7c7743c145
2 changed files with 3 additions and 4 deletions

View File

@ -43,8 +43,6 @@ pub struct TcpConnector {
impl TcpConnector {
pub fn new<S: AsRef<str>>(addr: S, port: u16, timeout: Duration) -> TcpConnector {
println!("TES: {:?} {:?}", addr.as_ref(), port);
// try to parse as a regular SocketAddr first
if let Ok(addr) = addr.as_ref().parse() {
let mut ips = VecDeque::new();

View File

@ -87,8 +87,9 @@ impl Writer {
// status line
// helpers::write_status_line(version, msg.status().as_u16(), &mut buffer);
// buffer.extend_from_slice(msg.reason().as_bytes());
buffer.extend_from_slice(b"GET /ws/ HTTP/1.1");
buffer.extend_from_slice(b"\r\n");
buffer.extend_from_slice(b"GET ");
buffer.extend_from_slice(msg.url.path().as_ref());
buffer.extend_from_slice(b" HTTP/1.1\r\n");
// write headers
for (key, value) in &msg.headers {