Pike v8.1 release 6

Method Protocols.HTTP.Server.Request()->response_and_finish()


Method response_and_finish

void response_and_finish(mapping m, function(:void)|void _log_cb)

Description

return a properly formatted response to the HTTP client

Parameter m

Contains elements for generating a response to the client.

"data" : string

Data to be returned to the client.

"file" : object

File object, the contents of which will be returned to the client.

"error" : int

HTTP error code

"size" : int

length of content returned. If file is provided, size bytes will be returned to client.

"modified" : string

contains optional modification date.

"type" : string

contains optional content-type

"extra_heads" : mapping

contains a mapping of additional headers to be returned to client.

"server" : string

contains the server identification header.