[][src]Struct http_desync_guardian::request_analyzer::HttpRequestData

pub struct HttpRequestData<'a> {
    pub method: HttpToken<'a>,
    pub version: HttpToken<'a>,
    pub uri: HttpToken<'a>,
    pub headers: SmallVec<[HttpHeader<'a>; 64]>,
}

Fields

method: HttpToken<'a>

Http Method, e.g. GET, POST, PUT, etc.

version: HttpToken<'a>

Protocol version 1.0 or 1.1

uri: HttpToken<'a>

Request URI

headers: SmallVec<[HttpHeader<'a>; 64]>

Http headers (assuming they were parsed by the HTTP engine)

Implementations

impl<'a> HttpRequestData<'a>[src]

pub fn new(request: &'a ExtHttpRequestData) -> Self[src]

Convert a C struct into an internal struct for Rust. It converts data from an external C call into internal data structures (without copying). Headers are constructed from external data from C with caution. Any invalid value for HeaderSafetyTier is defaulted to Compliant.

impl<'a> HttpRequestData<'a>[src]

pub fn analyze_raw_request(buf: HttpToken<'a>) -> RequestAnalysisResult[src]

Parse and analyze a raw HTTP request. This is the most consistent option, but comes with additional overhead, roughly doubled compared to analyze_parsed_request. See benchmarks for more info.

pub fn analyze_parsed_request(&mut self) -> RequestAnalysisResult[src]

If the HTTP engine doesn't sanitize data and is not lenient in parsing requests (e.g. doesn't treat "\n\r" as a valid line separator), then to avoid double parsing this method can be used.

Trait Implementations

impl<'a> Display for HttpRequestData<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for HttpRequestData<'a>

impl<'a> Send for HttpRequestData<'a>

impl<'a> Sync for HttpRequestData<'a>

impl<'a> Unpin for HttpRequestData<'a>

impl<'a> UnwindSafe for HttpRequestData<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.