class Crowbar::Rules::HTTPRule

Overview

Structure-preserving rule for HTTP/1.x messages. Parses Start Line, Headers, and Body, maintaining proper CRLF line framing while mutating paths, query parameters, header values, or body content.

Defined in:

crowbar/rules/http.cr

Constructors

Instance Method Summary

Instance methods inherited from class Crowbar::Rule

apply(context : Context, buffer : Buffer) : Bool apply, description : String description, match?(buffer : Buffer) : Bool match?, name : String name, targets(*targets : Symbol) targets, weight : Float64 weight, weight=(weight : Float64) weight=

Constructor methods inherited from class Crowbar::Rule

new(weight : Float64 = 1.0) new

Constructor Detail

def self.new(weight : Float64 = 1.0, sync_content_length : Bool = true) #

Instance Method Detail

def apply(context : Context, buffer : Buffer) : Bool #
Description copied from class Crowbar::Rule

Applies a structure-preserving transformation to the buffer


def body_rule(rule : Rule) #

def body_rule(format : Symbol) #

def body_rule : Rule | Nil #

def body_rule=(body_rule : Rule | Nil) #

def description : String #

def match?(buffer : Buffer) : Bool #
Description copied from class Crowbar::Rule

Checks whether the buffer matches the format handled by this rule


def name : String #

def sync_content_length=(sync_content_length : Bool) #

def sync_content_length? : Bool #

def targets : Array(Symbol) #

def targets(*targets : Symbol) #
Description copied from class Crowbar::Rule

Optional target filtering for format rules supporting selective mutation


def targets=(targets : Array(Symbol)) #