Function readerExpectNone [src]
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.
Prototype
pub fn readerExpectNone(request: *Request, buffer: []u8) *Reader
Parameters
request: *Request
buffer: []u8
Source
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);
}