about summary refs log tree commit diff stats
path: root/src/loader/loaderhandle.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-13 12:08:05 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-13 12:56:28 +0100
commitab203acf554993d15e37604773f160c84b4d8252 (patch)
tree45428aa45bc751f788cc5c52c32b15bb8a2363f1 /src/loader/loaderhandle.nim
parentbf761bcb6dcc5288a86aa5e8c2b67df3f0df056b (diff)
downloadchawan-ab203acf554993d15e37604773f160c84b4d8252.tar.gz
Move http out of main binary
Now it is (technically) no longer mandatory to link to libcurl.

Also, Chawan is at last completely protocol and network backend
agnostic :)

* Implement multipart requests in local CGI
* Implement simultaneous download of CGI data
* Add REQUEST_HEADERS env var with all headers
* cssparser: add a missing check in consumeEscape
Diffstat (limited to 'src/loader/loaderhandle.nim')
-rw-r--r--src/loader/loaderhandle.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/loader/loaderhandle.nim b/src/loader/loaderhandle.nim
index d8d01bb2..93367607 100644
--- a/src/loader/loaderhandle.nim
+++ b/src/loader/loaderhandle.nim
@@ -9,6 +9,8 @@ import loader/headers
 
 type LoaderHandle* = ref object
   ostream: Stream
+  # Stream for taking input
+  istream*: PosixStream
   # Only the first handle can be redirected, because a) mailcap can only
   # redirect the first handle and b) async redirects would result in race
   # conditions that would be difficult to untangle.
@@ -100,3 +102,5 @@ proc close*(handle: LoaderHandle) =
       discard
     handle.sostream.close()
   handle.ostream.close()
+  if handle.istream != nil:
+    handle.istream.close()