diff options
author | bptato <nincsnevem662@gmail.com> | 2024-09-28 18:17:25 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-09-28 18:24:54 +0200 |
commit | be86473ba4e39bafcf92b4c9f52e7fb2df767719 (patch) | |
tree | bf3b745f0a6038d034e2694d073d5b977e007539 /src/loader/loaderhandle.nim | |
parent | 1dea3e9fbe4a902db6325195df0d7a465f82cfc5 (diff) | |
download | chawan-be86473ba4e39bafcf92b4c9f52e7fb2df767719.tar.gz |
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.
Diffstat (limited to 'src/loader/loaderhandle.nim')
-rw-r--r-- | src/loader/loaderhandle.nim | 7 |
1 files changed, 7 insertions, 0 deletions
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 |