diff options
author | bptato <nincsnevem662@gmail.com> | 2023-04-30 19:35:46 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-04-30 19:35:46 +0200 |
commit | 4b260035a6b9c3e09348a6eb3be1b211851e1e3f (patch) | |
tree | 66b20076226d5992e7a6c7c811b2658ab1d32f16 /src/io | |
parent | f44339b49181db611a7f469eb36aaa3215bd2da8 (diff) | |
download | chawan-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.nim | 2 | ||||
-rw-r--r-- | src/io/request.nim | 8 |
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: |