pub struct SimpleTrafficCase {
pub title: Option<String>,
pub request: SimpleTrafficRequest,
pub expected: Option<Value>,
pub omit_rule: Option<bool>,
}Expand description
A single case in the SIMPLE traffic format (#987).
The WAFBench document shape (meta + tests + stages + input/output)
exists to carry CRS rule IDs and provenance. A hand-written or LLM-generated
traffic file has none of that, and asking authors to synthesise it buys
nothing. This is the shape people actually produce:
- title: utf-7 charset blocked
request:
method: POST
uri: /graphql
headers:
Content-Type: application/json; charset=utf-7
body: '...'
expected: 403Reported by Srikanth on #79: --wafbench-dir rejected exactly this with
invalid type: sequence, expected struct WafBenchFile.
Fields§
§title: Option<String>Human-readable name for the case.
request: SimpleTrafficRequestThe request to send.
expected: Option<Value>Expected status. Accepts 403, [403, 406], or { status: 403 }.
omit_rule: Option<bool>WAFBench’s baseline marker: send this case with the rule under test disabled. mockforge cannot honour it, because disabling a rule is WAF-side configuration and not something a traffic generator controls. Parsed only so the case can be reported and skipped instead of being silently sent as an unfalsifiable duplicate (#997).
Trait Implementations§
Source§impl Clone for SimpleTrafficCase
impl Clone for SimpleTrafficCase
Source§fn clone(&self) -> SimpleTrafficCase
fn clone(&self) -> SimpleTrafficCase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SimpleTrafficCase
impl Debug for SimpleTrafficCase
Source§impl<'de> Deserialize<'de> for SimpleTrafficCase
impl<'de> Deserialize<'de> for SimpleTrafficCase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SimpleTrafficCase
impl RefUnwindSafe for SimpleTrafficCase
impl Send for SimpleTrafficCase
impl Sync for SimpleTrafficCase
impl Unpin for SimpleTrafficCase
impl UnsafeUnpin for SimpleTrafficCase
impl UnwindSafe for SimpleTrafficCase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more