Add CopyToLimit, SetContentDisposition, GetUrlWithQuery, GetOriginalPathWithQuery, MakeAbsolute, WithLocationHeader, GetServerRoot, SendRedirect and add closure to MountableServer

This commit is contained in:
2025-10-15 23:18:44 -05:00
parent 1e5167ab8b
commit b889b09287
5 changed files with 144 additions and 36 deletions

View File

@@ -3489,6 +3489,19 @@ namespace Tesses::CrossLang {
cse.back()->Push(gc, nullptr);
return false;
}
if(key == "CopyToLimit")
{
std::shared_ptr<Tesses::Framework::Streams::Stream> data;
int64_t cnt;
int64_t buffSize;
if(GetArgument(args,0,data) && GetArgument(args,1,cnt))
{
if(!GetArgument<int64_t>(args,2,buffSize)) buffSize=1024;
strm->CopyToLimit(data,(uint64_t)cnt,(size_t)buffSize);
}
cse.back()->Push(gc, nullptr);
return false;
}
if(key == "Flush")
{
strm->Flush();