about summary refs log tree commit diff stats
path: root/src/ips/forkserver.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-26 10:58:10 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-26 10:58:10 +0200
commite5d170aa66a9fdc2ba2258f42d054d7d998e5915 (patch)
treefe398035de20112de76701b95c695303638ca6f1 /src/ips/forkserver.nim
parenta11e9468001f19ac3874bec540a5a9cbd94739bc (diff)
downloadchawan-e5d170aa66a9fdc2ba2258f42d054d7d998e5915.tar.gz
Allow overriding default headers
Diffstat (limited to 'src/ips/forkserver.nim')
-rw-r--r--src/ips/forkserver.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ips/forkserver.nim b/src/ips/forkserver.nim
index ec0c60d1..681b3aa5 100644
--- a/src/ips/forkserver.nim
+++ b/src/ips/forkserver.nim
@@ -34,14 +34,11 @@ type
     ostream: Stream
     children: seq[(Pid, Pid)]
 
-proc newFileLoader*(forkserver: ForkServer, defaultHeaders: Headers = nil,
+proc newFileLoader*(forkserver: ForkServer, defaultHeaders: Headers,
     filter = newURLFilter(default = true), cookiejar: CookieJar = nil,
     proxy: URL = nil, acceptProxy = false): FileLoader =
   forkserver.ostream.swrite(FORK_LOADER)
   var defaultHeaders = defaultHeaders
-  if defaultHeaders == nil:
-    new(defaultHeaders)
-    defaultHeaders[] = DefaultHeaders
   let config = LoaderConfig(
     defaultHeaders: defaultHeaders,
     filter: filter,