|
|
|
@ -129,7 +129,7 @@ fn generate_request(mut request: Request) -> Result<(Vec<u8>, String)> { |
|
|
|
|
//
|
|
|
|
|
// See similar problem in `hyper`: https://github.com/hyperium/hyper/issues/1492
|
|
|
|
|
let headers = request.headers_mut(); |
|
|
|
|
for header in WEBSOCKET_HEADERS { |
|
|
|
|
for &header in &WEBSOCKET_HEADERS { |
|
|
|
|
let value = headers.remove(header).ok_or_else(|| { |
|
|
|
|
Error::Protocol(ProtocolError::InvalidHeader( |
|
|
|
|
HeaderName::from_bytes(header.as_bytes()).unwrap(), |
|
|
|
|