-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
機能追加の動機
traq-bot-http-rs/src/parser.rs
Lines 91 to 113 in 835643b
| content_type | |
| .ok_or(ParseError::ContentTypeNotFound) | |
| .map(|ct| ct.starts_with("application/json"))? | |
| .then_some(()) | |
| .ok_or(ParseError::ContentTypeMismatch)?; | |
| token | |
| .ok_or(ParseError::BotTokenNotFound) | |
| .and_then(|t| { | |
| valid_header_value(t) | |
| .then_some(t) | |
| .ok_or(ParseError::ReadBotTokenFailed) | |
| }) | |
| .map(|t| t == self.verification_token)? | |
| .then_some(()) | |
| .ok_or(ParseError::BotTokenMismatch)?; | |
| kind.ok_or(ParseError::BotEventNotFound) | |
| .and_then(|k| { | |
| valid_header_value(k) | |
| .then_some(k) | |
| .ok_or(ParseError::ReadBotEventFailed) | |
| })? | |
| .parse() | |
| .map_err(|_| ParseError::BotEventMismatch) |
content_typeだけ入ってないのはおかしい
望ましい解決方法
入れる
他に検討した代替案
補足説明
もし何かあれば
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed