class

Crowbar::Rules::HTTPRule

Inherits Crowbar::Rule < Reference < Object

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.

Constructors

new(weight : Float64 = 1.0, sync_content_length : Bool = true)
Source

Instance methods

apply(context : Context, buffer : Buffer) : Bool

Applies a structure-preserving transformation to the buffer

Source
body_rule(rule : Rule)
Source
body_rule(format : Symbol)
Source
body_rule
Source
body_rule=(body_rule : Rule | Nil)
Source
description
Source
match?(buffer : Buffer) : Bool

Checks whether the buffer matches the format handled by this rule

Source
name
Source
sync_content_length=(sync_content_length : Bool)
Source
sync_content_length?
Source
targets
Source
targets(*targets : Symbol)

Optional target filtering for format rules supporting selective mutation

Source
targets=(targets : Array(Symbol))
Source