about summary refs log tree commit diff stats
path: root/src/io
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-04-30 19:35:46 +0200
committerbptato <nincsnevem662@gmail.com>2023-04-30 19:35:46 +0200
commit4b260035a6b9c3e09348a6eb3be1b211851e1e3f (patch)
tree66b20076226d5992e7a6c7c811b2658ab1d32f16 /src/io
parentf44339b49181db611a7f469eb36aaa3215bd2da8 (diff)
downloadchawan-4b260035a6b9c3e09348a6eb3be1b211851e1e3f.tar.gz
Temporarily disable multipart
It never really worked, and I can't be bothered to fix it now
Diffstat (limited to 'src/io')
-rw-r--r--src/io/loader.nim2
-rw-r--r--src/io/request.nim8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/io/loader.nim b/src/io/loader.nim
index 7c55b2bc..2cb2b295 100644
--- a/src/io/loader.nim
+++ b/src/io/loader.nim
@@ -221,7 +221,7 @@ proc applyHeaders(request: Request, response: Response) =
             destination = request.destination)
         else:
           response.redirect = newRequest(url.get, request.httpmethod,
-            body = request.body, multipart = request.multipart,
+            body = request.body, # multipart = request.multipart, TODO TODO TODO
             mode = request.mode, credentialsMode = request.credentialsMode,
             destination = request.destination)
 
diff --git a/src/io/request.nim b/src/io/request.nim
index 6234ff1f..d61a19fa 100644
--- a/src/io/request.nim
+++ b/src/io/request.nim
@@ -153,7 +153,7 @@ func newHeaderList*(table: Table[string, string]): HeaderList =
       result.table[k] = @[v]
 
 func newRequest*(url: URL, httpmethod = HTTP_GET, headers = newHeaderList(),
-                 body = none(string), multipart = none(MimeData),
+                 body = none(string), # multipart = none(MimeData),
                  mode = RequestMode.NO_CORS,
                  credentialsMode = CredentialsMode.SAME_ORIGIN,
                  destination = RequestDestination.NO_DESTINATION,
@@ -163,7 +163,7 @@ func newRequest*(url: URL, httpmethod = HTTP_GET, headers = newHeaderList(),
     httpmethod: httpmethod,
     headers: headers,
     body: body,
-    multipart: multipart,
+    #multipart: multipart,
     mode: mode,
     credentialsMode: credentialsMode,
     destination: destination,
@@ -171,13 +171,13 @@ func newRequest*(url: URL, httpmethod = HTTP_GET, headers = newHeaderList(),
   )
 
 func newRequest*(url: URL, httpmethod = HTTP_GET, headers: seq[(string, string)] = @[],
-                 body = none(string), multipart = none(MimeData),
+                 body = none(string), # multipart = none(MimeData), TODO TODO TODO multipart
                  mode = RequestMode.NO_CORS, proxy: URL = nil): Request {.jsctor.} =
   let hl = newHeaderList()
   for pair in headers:
     let (k, v) = pair
     hl.table[k] = @[v]
-  return newRequest(url, httpmethod, hl, body, multipart, mode)
+  return newRequest(url, httpmethod, hl, body, mode)
 
 func createPotentialCORSRequest*(url: URL, destination: RequestDestination, cors: CORSAttribute, fallbackFlag = false): Request =
   var mode = if cors == NO_CORS: