Add more fixes
This commit is contained in:
		
							parent
							
								
									45a6744d4d
								
							
						
					
					
						commit
						073b72c9ed
					
				| @ -87,14 +87,16 @@ impl<'a, 'r> FromRequest<'a, 'r> for ApRequest { | ||||
|             .map(|header| { | ||||
|                 header | ||||
|                     .split(',') | ||||
|                     .map(|ct| match ct.trim() { | ||||
|                     .map(|ct| { | ||||
|                         match ct.trim() { | ||||
|                         // bool for Forward: true if found a valid Content-Type for Plume first (HTML), false otherwise
 | ||||
|                         "application/ld+json; profile=\"https://w3.org/ns/activitystreams\"" | ||||
|                         | "application/ld+json;profile=\"https://w3.org/ns/activitystreams\"" | ||||
|                         "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"" | ||||
|                         | "application/ld+json;profile=\"https://www.w3.org/ns/activitystreams\"" | ||||
|                         | "application/activity+json" | ||||
|                         | "application/ld+json" => Outcome::Success(ApRequest), | ||||
|                         "text/html" => Outcome::Forward(true), | ||||
|                         _ => Outcome::Forward(false), | ||||
|                     } | ||||
|                     }) | ||||
|                     .fold(Outcome::Forward(false), |out, ct| { | ||||
|                         if out.clone().forwarded().unwrap_or_else(|| out.is_success()) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user