readerExpectContinue
In the case that the request contains "expect: 100-continue", this
function writes the continuation header, which means it can fail with a
write error. After sending the continuation header, it sets the
request's expect field to null.
Asserts that this function is only called once.
See readerExpectNone for an infallible alternative that cannot write
to the server output stream.
Function parameters
Parameters
- request:*Request
- buffer:[]u8
Type definitions in this namespace
Types
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 readerExpectContinue(request: *Request, buffer: []u8) ExpectContinueError!*Reader {
const flush = request.head.expect != null;
try writeExpectContinue(request);
if (flush) try request.server.out.flush();
return readerExpectNone(request, buffer);
}