DoxigAlpha

writeExpectContinue

Function parameters

Parameters

#
request:*Request

Type definitions in this namespace

Types

#
WebSocket
See https://tools.ietf.org/html/rfc6455

Initialize an HTTP server that can respond to multiple requests on the same

Functions

#
init
Initialize an HTTP server that can respond to multiple requests on the same

Error sets in this namespace

Error Sets

#

Source

Implementation

#
pub fn writeExpectContinue(request: *Request) ExpectContinueError!void {
    const expect = request.head.expect orelse return;
    if (!mem.eql(u8, expect, "100-continue")) return error.HttpExpectationFailed;
    try request.server.out.writeAll("HTTP/1.1 100 Continue\r\n\r\n");
    request.head.expect = null;
}