about summary refs log tree commit diff stats
path: root/src/local/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-05-30 00:19:48 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-20 17:50:22 +0200
commit60dc37269cd2dc8cdf23d9f77680f6af9490032f (patch)
tree9a72ba24daffa546f92704e7e06cf84fded2d89d /src/local/client.nim
parenta146a22b11cea39bc691417d9d9a1292b7177552 (diff)
downloadchawan-60dc37269cd2dc8cdf23d9f77680f6af9490032f.tar.gz
img, loader: separate out png codec into cgi, misc improvements
* multi-processed and sandboxed PNG decoding & encoding (through local
  CGI)
* improved request body passing (including support for output id as
  response body)
* simplified & faster blob()/text() - now every request starts
  suspended, and OngoingData.buf has been replaced with loader's
  buffering capability
* image caching: we no longer pull bitmaps from the container after
  every single getLines call

Next steps: replace our bespoke PNG decoder with something more usable,
add other decoders, and make them stream.
Diffstat (limited to 'src/local/client.nim')
-rw-r--r--src/local/client.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index 8e83892c..ee469652 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -438,10 +438,10 @@ proc acceptBuffers(client: Client) =
         let pid = container.process
         if item.fdout == item.fdin:
           loader.shareCachedItem(container.cacheId, pid)
-          loader.resume(@[item.istreamOutputId])
+          loader.resume(item.istreamOutputId)
         else:
           outCacheId = loader.addCacheFile(item.ostreamOutputId, pid).outputId
-          loader.resume(@[item.istreamOutputId, item.ostreamOutputId])
+          loader.resume([item.istreamOutputId, item.ostreamOutputId])
         w.swrite(outCacheId)
     if item.fdin != -1:
       # pass down fdout