-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(processor): Remove form data envelope items (#4428)
- Loading branch information
1 parent
2fafc92
commit ad26c42
Showing
5 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use crate::envelope::ItemType; | ||
use crate::services::processor::StandaloneGroup; | ||
use crate::utils::{ItemAction, TypedEnvelope}; | ||
|
||
/// Processes a standalone envelope by removing unnecessary items. | ||
/// | ||
/// This function removes form data items from the envelope since they are not allowed in | ||
/// standalone processing. | ||
pub fn process(managed_envelope: &mut TypedEnvelope<StandaloneGroup>) { | ||
managed_envelope.retain_items(|i| match i.ty() { | ||
ItemType::FormData => ItemAction::DropSilently, | ||
_ => ItemAction::Keep, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters