| 370 | } |
| 371 | |
| 372 | void HttpAsyncFileServer::Stream::PutFileListener::onFinish() |
| 373 | { |
| 374 | SC_HTTP_ASSERT_RELEASE(connection != nullptr); |
| 375 | AsyncWritableStream& writable = *connection->pipeline.sinks[0]; |
| 376 | const bool removedFinishListener = |
| 377 | writable.eventFinish.removeListener<HttpAsyncFileServer::Stream::PutFileListener, |
| 378 | &HttpAsyncFileServer::Stream::PutFileListener::onFinish>(*this); |
| 379 | SC_HTTP_ASSERT_RELEASE(removedFinishListener); |
| 380 | SC_HTTP_ASSERT_RELEASE(connection->response.sendEmpty(201)); |
| 381 | } |
| 382 | |
| 383 | StringSpan HttpAsyncFileServer::Internal::getContentType(const HttpAsyncFileServerOptions& options, |
| 384 | const StringSpan extension) |