Implemented a typed Authorization header
An Authorization header contains a Scheme. If you have no real scheme, you can use String as your scheme (Authorization<String>). This includes the `Basic` scheme built-in.
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							7478f3dfd6
						
					
				
				
					commit
					91a8e03e7a
				
			| @@ -9,7 +9,7 @@ pub fn from_one_raw_str<T: FromStr>(raw: &[Vec<u8>]) -> Option<T> { | ||||
|         return None; | ||||
|     } | ||||
|     // we JUST checked that raw.len() == 1, so raw[0] WILL exist. | ||||
|     match from_utf8(unsafe { raw.as_slice().unsafe_get(0).as_slice() }) { | ||||
|     match from_utf8(unsafe { raw[].unsafe_get(0)[] }) { | ||||
|         Some(s) => FromStr::from_str(s), | ||||
|         None => None | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user