data HTTP::Options(read_header_timeout: Duration, idle_timeout: Duration, read_timeout: Duration, write_timeout: Duration, max_header_bytes: Int, max_body_bytes: Int, max_connections: Int, proxies: HTTP::Proxies, on_error: shareable (Exception, HTTP::Request?) -> Void?)

A server's settings, as Server.new takes them.

<std:http>:1136

Methods

def with(read_header_timeout: Duration = …, idle_timeout: Duration = …, read_timeout: Duration = …, write_timeout: Duration = …, max_header_bytes: Int = …, max_body_bytes: Int = …, max_connections: Int = …, proxies: HTTP::Proxies = …, on_error: shareable (Exception, HTTP::Request?) -> Void? = …) -> HTTP::Options

A copy with the fields given replaced.

<std:http>:1136

def to_h -> Hash[Symbol, Object]

The fields as a Hash, by name.

<std:http>:1136

def read_header_timeout -> Duration

The limit on reading a request's headers: from its first byte to the end of its headers (and, for a connection's first request, before that byte).

<std:http>:1140

def idle_timeout -> Duration

The limit on waiting for the next request on a kept connection.

<std:http>:1142

def read_timeout -> Duration

The limit on each read of a request's body (408 when it runs out).

<std:http>:1144

def write_timeout -> Duration

The limit on writing one response, or one chunk of a ResponseBody::Stream body.

<std:http>:1147

def max_header_bytes -> Int

The limit on the size of a request's line and headers together (431 past it).

<std:http>:1150

def max_body_bytes -> Int

The limit on the size of a body that Body#read and Body#read_bytes accept (413 past it).

<std:http>:1153

def max_connections -> Int

The limit on connections served at once; beyond it, accepting waits.

<std:http>:1156

def proxies -> HTTP::Proxies

The peers whose X-Forwarded-* headers are believed.

<std:http>:1158

def on_error -> shareable (Exception, HTTP::Request?) -> Void?

The procedure called with what a handler raised (other than an HTTP::Error) and the request; when nil, the error is written to STDERR.

<std:http>:1162