readerExpectNone
Asserts the expect header is null. The caller must handle the
expectation manually and then set the value to null prior to calling
this function.
Asserts that this function is only called once.
Invalidates the string memory inside Head.
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 readerExpectNone(request: *Request, buffer: []u8) *Reader {
assert(request.server.reader.state == .received_head);
assert(request.head.expect == null);
request.head.invalidateStrings();
if (!request.head.method.requestHasBody()) return .ending;
return request.server.reader.bodyReader(buffer, request.head.transfer_encoding, request.head.content_length);
}