fix(client): return error if Request has CONNECT method
				
					
				
			The higher-level `Client` has never supported `CONNECT` requests, but it used to send them, and then handle the responses incorrectly. Now, it will return an error immediately instead of misbehaving.
This commit is contained in:
		| @@ -138,9 +138,15 @@ where C: Connect, | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         if req.method() == &Method::Connect { | ||||
|             debug!("Client does not support CONNECT requests"); | ||||
|             return FutureResponse(Box::new(future::err(::Error::Method))); | ||||
|         } | ||||
|  | ||||
|         let domain = match uri::scheme_and_authority(req.uri()) { | ||||
|             Some(uri) => uri, | ||||
|             None => { | ||||
|                 debug!("request uri does not include scheme and authority"); | ||||
|                 return FutureResponse(Box::new(future::err(::Error::Io( | ||||
|                     io::Error::new( | ||||
|                         io::ErrorKind::InvalidInput, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user