Class Rex::Proto::Http::Packet
In: lib/rex/proto/http/packet.rb
Parent: Object

This class represents an HTTP packet.

Methods

[]   []=   chunk   cmd_string   completed?   from_s   new   parse   parse_body   parse_header   parse_header_re   reset   to_s   update_cmd_parts  

Classes and Modules

Module Rex::Proto::Http::Packet::ParseCode
Module Rex::Proto::Http::Packet::ParseState
Class Rex::Proto::Http::Packet::Header

Attributes

auto_cl  [RW] 
body  [RW] 
body_bytes_left  [RW] 
bufq  [RW] 
chunk_max_size  [RW] 
chunk_min_size  [RW] 
compress  [RW] 
error  [R] 
error  [W] 
headers  [R] 
headers  [W] 
incomplete  [W] 
incomplete  [R] 
inside_chunk  [RW] 
max_data  [RW] 
state  [RW] 
transfer_chunked  [RW] 

Public Class methods

Initializes an instance of an HTTP packet.

Public Instance methods

Return the associated header value, if any.

Set the associated header value.

Build a ‘Transfer-Encoding: chunked’ payload with random chunk sizes

Returns the command string, such as:

HTTP/1.0 200 OK for a response

or

GET /foo HTTP/1.0 for a request

Returns whether or not parsing has completed.

Converts the packet from a string.

Parses the supplied buffer. Returns one of the two parser processing codes (Completed, Partial, or Error).

Reset the parsing state and buffers.

Converts the packet to a string.

Protected Instance methods

Parses the body portion of the request.

Parses the header portion of the request.

Allows derived classes to split apart the command string.

[Validate]