From be86473ba4e39bafcf92b4c9f52e7fb2df767719 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 28 Sep 2024 18:17:25 +0200 Subject: loader: send headers for tocache requests too This lets us send the transparency bit as a header, and also halves the number of header parsers in loader. --- src/loader/loaderhandle.nim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/loader/loaderhandle.nim') diff --git a/src/loader/loaderhandle.nim b/src/loader/loaderhandle.nim index b43149fb..4813d55d 100644 --- a/src/loader/loaderhandle.nim +++ b/src/loader/loaderhandle.nim @@ -17,6 +17,12 @@ type page*: ptr UncheckedArray[uint8] len*: int + CachedItem* = ref object + id*: int + refc*: int + offset*: int + path*: string + LoaderBuffer* = ref LoaderBufferObj LoaderHandle* = ref object of RootObj @@ -28,6 +34,7 @@ type InputHandle* = ref object of LoaderHandle outputs*: seq[OutputHandle] # list of outputs to be streamed into cacheId*: int # if cached, our ID in a client cacheMap + cacheRef*: CachedItem # if this is a tocache handle, a ref to our cache item parser*: HeaderParser # only exists for CGI handles rstate: ResponseState # track response state -- cgit 1.4.1-2-gfad0