MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / postMultipart

Method postMultipart

Libraries/Http/HttpAsyncFileServer.cpp:891–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889}
890
891Result HttpAsyncFileServer::postMultipart(HttpAsyncFileServer::Stream& stream, HttpConnection& connection)
892{
893 SC_TRY(stream.multipartParser.initWithBoundary(connection.request.getBoundary()));
894
895 stream.multipartListener.server = this;
896 stream.multipartListener.stream = &stream;
897 stream.multipartListener.connection = &connection;
898 stream.multipartListener.currentHeaderName = {};
899 stream.multipartListener.partHeaders.reset();
900 stream.multipartListener.rejectedFileName = false;
901
902 SC_HTTP_ASSERT_RELEASE((
903 connection.request.getReadableStream()
904 .eventData.addListener<HttpAsyncFileServer::Stream::MultipartListener,
905 &HttpAsyncFileServer::Stream::MultipartListener::onData>(stream.multipartListener)));
906
907 return Result(true);
908}
909
910void HttpAsyncFileServer::Stream::MultipartListener::onData(AsyncBufferView::ID bufferID)
911{

Callers

nothing calls this directly

Calls 4

initWithBoundaryMethod · 0.80
getBoundaryMethod · 0.80
ResultClass · 0.50
resetMethod · 0.45

Tested by

no test coverage detected