vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Class HTTPServerSettings

Contains all settings for configuring a basic HTTP server.

class HTTPServerSettings ;

The defaults are sufficient for most normal uses.

Constructors

NameDescription
this (bind_string) Constructs a new settings object with a custom bind interface and/or port.
this () Constructs a new settings object with default values.

Fields

NameTypeDescription
accessLogFile stringSpefifies the name of a file to which access log messages are appended.
accessLogFormat stringSpecifies the format used for the access log.
accessLogger HTTPLoggerSpecifies a custom access logger instance.
accessLogToConsole boolIf set, access log entries will be output to the console.
bindAddresses string[]The interfaces on which the HTTP server is listening.
disableDistHost boolDisable support for VibeDist and instead start listening immediately.
hostName stringDetermines the server host name.
keepAliveTimeout core.time.DurationMaximum time between two request on a keep-alive connection
maxRequestHeaderLineSize ulongMaximum number of bytes in a single line in the request header.
maxRequestHeaderSize ulongMaximum number of transferred bytes for the request header. This includes the request line the url and all headers.
maxRequestSize ulongMaximum number of transferred bytes per request after which the connection is closed with an error
maxRequestTime core.time.DurationTime of a request after which the connection is closed with an error; not supported yet
options HTTPServerOptionConfigures optional features of the HTTP server
port ushortThe port on which the HTTP server is listening.
rejectConnectionPredicate nothrow @safe bool delegate(in NetworkAddress)Provides a way to reject incoming connections as early as possible.
serverString string
sessionIdCookie string
sessionOptions SessionOptionSession options to use when initializing a new session.
sessionStore SessionStoreSession management is enabled if a session store instance is provided
tlsContext TLSContextIf set, a HTTPS server will be started instead of plain HTTP.
useCompressionIfPossible boolResponds to "Accept-Encoding" by using compression if possible.
webSocketPingInterval core.time.DurationInterval between WebSocket ping frames.

Properties

NameTypeDescription
dup[get] HTTPServerSettingsReturns a duplicate of the settings object.
errorPageHandler[get, set] @safe void delegate(HTTPServerRequest, HTTPServerResponse, HTTPServerErrorInfo)Sets a custom handler for displaying error pages for HTTP errors
errorPageHandler[set] void delegate(HTTPServerRequest, HTTPServerResponse, HTTPServerErrorInfo)Scheduled for deprecation - use a @safe callback instead.
Authors

Sönke Ludwig, Jan Krüger, Ilya Shipunov

Copyright

© 2012-2017 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.